You are not logged in.
Hi,
I want Xinha to be loaded from HTC component's script. Below is the source from HTC file. Below script is actually snapshot of the simple_example.html under the example folder.
<HTML xmlns="http://www.abc.com">
<HEAD>
<TITLE>Simple example of Xinha</TITLE>
<SCRIPT type="text/javascript">
var _editor_url = "/Xinha/";
var _editor_lang = "en";
</SCRIPT>
<!-- Load up the actual editor core -->
<SCRIPT type="text/javascript" src="/Xinha/XinhaCore.js"></SCRIPT>
<SCRIPT type="text/javascript">
xinha_editors = null;
xinha_init = null;
xinha_config = null;
xinha_plugins = null;
// This contains the names of textareas we will make into Xinha editors
xinha_init = xinha_init ? xinha_init : function()
{
xinha_editors = xinha_editors ? xinha_editors :
[
'taTextArea'
];
xinha_plugins = xinha_plugins ? xinha_plugins :
[ ];
if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
xinha_config.toolbar =
[
["popupeditor"],
["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"],
["separator","forecolor","hilitecolor","textindicator"],
["separator","subscript","superscript"],
["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],
["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
["separator","inserthorizontalrule","createlink","insertimage","inserttable"],
["linebreak","separator","undo","redo","selectall","print"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright", "righttoleft"],
["separator","htmlmode","showhelp","about"]
];
xinha_config.pageStyleSheets = [ _editor_url + "examples/full_example.css" ];
xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
Xinha.startEditors(xinha_editors);
}
Xinha._addEvent(window,'load', xinha_init);
</SCRIPT>
</HEAD>
<PUBLIC:COMPONENT tagName="EDITOR">
<PUBLIC:DEFAULTS viewLinkContent tabStop viewMasterTab="false"/>
</PUBLIC:COMPONENT>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<BODY>
<textarea id="taTextArea">test</textarea>
</BODY>
</HTML>
I consume this HTC in HTML file using source
<HTML>
<HEAD>
<?IMPORT IMPLEMENTATION="/htc/abc.htc"/>
</HEAD>
<body>
<EDITOR id="eneNew">This is test</EDITOR>
</body>
</HTML>
but browsing the HTML file in browser gives error. Error messge is Object doesn't support this action
And after debugging i found it is faliling at the statement
var f=new b(this,c); in the XinhaCore.js
can somebody please help me to resolve the issue?
Offline
Offline
Ohh... Sorry
Yes, It should be <textarea name="taTextArea">test</textarea>. But i checked carefully and its usign the "name" attribute with value "taTextArea".
This is the case with not using any plugins, but moment i add the any plugin say "Linker", i get the error
Microsoft JScript runtime error: 'Xinha.getPluginConstructor(...)' is null or not an object.
gogo, i confirmed that same script is working when i try it from the HTML file.
Plese note I am using the IE8 browser.
Offline
I am using the package Xinha 0.96.1. I tried with both the packages 1) Xinha-0.96.1-Compressed.zip 4.4 MB zip, YUI Compressed Javascript , 2)Xinha-0.96.1.zip 4.5 MB zip (downloaded from http://trac.xinha.org/wiki/DownloadsPage).
Offline