You are not logged in.
With this code in xinha.js, all works Fine:
xinha_editors = xinha_editors ? xinha_editors :
[
'text-1', 'text-2'
];
But with this code, xinha breaks:
xinha_editors = xinha_editors ? xinha_editors :
[
'text-1', 'text-2', 'news'
];
In this case, <textarea id="news"> is in a different form, where I also wish to use Xinha. If I add dummy text areas so that all forms have all text areas, it works again, but that is no good, I can't keep track of that when the project gets bigger.
Is there a work-around to this? Some kind of conditional to use? Suggested pseudocode:
if (the named textarea exists in this document)
add it to the list of editors
Sorry, my JavaScript isn't up to that.
Yerfdoggy
Offline
I found another reference to this at:
http://xinha.gogo.co.nz/punbb/viewtopic.php?id=376
James says there must be an editor on the page for every one in the config file, no exceptions.
So, how on earth can I use Xinha on multiple forms with various text areas named differently and configured in different ways? I certainly can't upload a new version of Xinha for each form...
No doubt I am missing something.
Yerfdoggy
Offline
OK, perhaps I understand.
I originally got hold of Xinha a fair while ago and implemented it in a big rush on a project I needed finished ASAP. I had a fair bit of grief getting it to run (always happens when you do things quickly) but eventually it worked. So now I'm trying to use it the same way in another massive project and I still haven't read TFM properly.
I'm including xinha.js on each page and trying to customise editors in that file (i.e. xinha.js). Apparently, I have to create a my_config.js for each page and do the customisation there. I just figured this out and will try it. If I'm wrong, perhaps someone can let me know.
I posted this just to save someone time.
thanks,
Y.
Offline