You are not logged in.
Pages: 1
Heya
I installed xinha today:
'$LastChangedDate: 2006-12-07 02:03:34 +1300 (Thu, 07 Dec 2006)
and I recognized that multiple Editors set in my_config.js don't work.
You know, this here:
xinha_editors = xinha_editors ? xinha_editors :
[
'iSubInhalt',
'newbiearea1'
];
None of those can be loaded - only if I set ONLY one Textarea-Name in it.
Someone has experienced that too?
Offline
Hey ray
sorry for the delay, the webserver was down :-/
If i set multiple editors in the my_config.js (like shown above) I get a JS error in IE:
Row 114
Char 5
Error 'this._textArea' is Null or not an Object
Code 0
I also tried it in writing it in the same row, space between comma and so on.
edit: tested it with IE 6 and Firefox 2. IE 6 shows the error, Firefox just doesnt do anything except showing the (normal) textarea field.
Last edited by Napsty (2006-12-11 12:49:40)
Offline
Uh oh... do you mean the textareas have to be IN THE SAME html-page that it would work?
I have two different pages, each with one textarea and the same script codes...
Offline
yeah, thats right
simply pull xinha_editors out of your config
Page:
<script type="text/javascript">
xinha_editors =
[
'myTextArea'
];
</script>
<script type="text/javascript" src="../htmlarea.js"></script>
<script type="text/javascript" src="config.js"></script>
config.js:
//xinha_editors = null; <-------------------------------- Don't forget this!
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()
{
/** STEP 1 ***************************************************************
* First, what are the plugins you will be using in the editors on this
* page. List all the plugins you will need, even if not all the editors
* will use all the plugins.
************************************************************************/
Offline
GREAT! Thank you, ray!
I did it like that now:
<script type="text/javascript">
_editor_url = "/inc/xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "de"; // And the language we need to use in the editor.
xinha_editors = ['iSubInhalt']; // defines the textarea
</script>
<script type="text/javascript" src="/inc/xinha/htmlarea.js"></script>
<script type="text/javascript" src="/inc/xinha/ag_config.js"></script>
And it works well with several Textareas. Thx again!
Offline
Hi. I have the same problem. I followed the above instructions but nothing happened. I have two pages. Each one includes one <textarea>.
Page1 - working page
<script type="text/javascript">
_editor_url = "../../xinha/";
_editor_lang = "en";
_editor_skin = "../../xinha/skins/green-look";
xinha_editors = ['description'];
</script>
<script type="text/javascript" src="../../xinha/XinhaCore.js"></script>
<script type="text/javascript" src="../../xinha/htmlarea.js"></script>
<script type="text/javascript" src="../../xinha/my_config.js"></script>
.
.
.
<textarea id="description" name="description" rows="20" cols="50" style="width: 100%"></textarea>
Page2 - not working page
<script type="text/javascript">
_editor_url = "../../xinha/";
_editor_lang = "en";
_editor_skin = "../../xinha/skins/green-look";
xinha_editors = ['description'];
</script>
<script type="text/javascript" src="../../xinha/XinhaCore.js"></script>
<script type="text/javascript" src="../../xinha/htmlarea.js"></script>
<script type="text/javascript" src="../../xinha/my_config.js"></script>
.
.
.
<textarea id="description" name="description" rows="20" cols="50" style="width: 100%"></textarea>
my_config.js
//xinha_editors=null;
xinha_init=null;
xinha_config=null;
xinha_plugins=null;
xinha_init=xinha_init?xinha_init:function()
{
//xinha_editors=xinha_editors?xinha_editors:['description'];
xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","ContextMenu","ListType","Stylist","Linker","SuperClean","TableOperations"];
if(!Xinha.loadPlugins(xinha_plugins,xinha_init))
{
return;
}
xinha_config=xinha_config?xinha_config():new Xinha.Config();
//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);
Any ideas?
Last edited by mcrosmar (2007-10-06 11:26:15)
Offline
I found it!!! I was set wrong paths
Offline
Pages: 1