You are not logged in.
I noticed after using the Nightly build that two instances of Xinha doesnt work in my Firefox, meaning that the second instance is none selectable. You could however flip from html to source and back and it works.
I also see that the latest edition of Xinha has edited the way of creating the Xinhas with the new HTMLArea.startEditors function, and not having the setTimeout for extra editors.
The quick fix, atleast for me is :
Ive loaded two instances like this :
xinha_editors = xinha_editors ? xinha_editors :
[
'cms_ingress',
'cms'
];
I replaced this :
HTMLArea.startEditors(xinha_editors);
With this :
setTimeout(function() {
xinha_editors.cms_ingress.generate();
}, 100);
setTimeout(function() {
xinha_editors.cms.generate();
}, 300);
And it all works again, the first timeOut is probably not needed, but it doesnt really matter in my opinion if it goes an extra second to initialize the editor. Adding some code to the HTMLArea.startEditors would just need to to set the >1 editors with timeouts and it should be solved.
Offline
This is not a good solution for our case (I know its the way we used on other editors and since xinha didnt need it was one of the reasons we liked xinha). In our case we load different versions of my_config.js throughout our site dynamically and they apply to pages that sometimes have multiple editors and other times do not, and also the editor names are generated on their respective pages. Im sure we could write a function to count the editors and set multiple timeouts etc, but since this was working before we should go back to the older method.
Anyone know when this changed?
Thanks,
Will
Offline
...please help me to reproduce this bug.
i'm using full_example.html with Number of Editors "3"
and i can use all three...
Niko
Offline
If you are using firefox just go to:
http://xinha.gogo.co.nz/xinha-nightly/e … ample.html
use more then 1 editor.
go to the first editor and hit enter after " Nunc sit amet metus in tortor semper mattis." so it creates a new bullet.
now in the other editors you cannot edit the text.
(this is a bug that almost every other wysiwyg editor had when loading text/graphics into multiple editors for editing. Xinha never had this problem before).
Offline
...this only happens with the stylist-plugin!
so it seems to be a bug in there!
can you confirm this?
edit: yes, only in firefox
Last edited by niko (2005-05-03 01:38:23)
Niko
Offline
thats not it. my system doesnt have that plugin and i tried removing some plugins and it worked but not others. theres some sort of combination happening but it seems to be related to loading plugins at least...
Last edited by willeffects (2005-05-03 03:10:34)
Offline
'ContextMenu',
'FullScreen',
'SpellChecker',
'FindReplace',
'TableOperations'
fails
'FullScreen',
'SpellChecker',
'FindReplace',
'TableOperations'
fails
'TableOperations'
works
'FindReplace',
'TableOperations'
fails
'FindReplace'
fails
fails
'ContextMenu',
'FullScreen',
'SpellChecker',
'TableOperations'
fails
'SpellChecker',
'FindReplace',
'TableOperations'
fails
Offline
The timeout thing worked for me (but only if the delay between editor loads is at least 300ms) - but does anyone know why this works? What are the causes of this problem?
Offline
the timeout is no solution at all.
on faster computers it won't work anymore - and it is just a workaround.
Niko
Offline
Cant we go back to the old method of loading? Why did it get switched?
Offline
Trying to generalize that timeout method to apply it to all textareas in the page (a bit like replaceAll used to do), I stumbled upon this strange bug
CODE :
for (var i = 0; i<xinha_editors.length;i++) {
alert("*"+xinha_editors[i]);
}
xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
for (var editor in xinha_editors){
alert(editor);
}
ENDCODE
This spits out "*firstfield" then "*secondfield" but the second alert loop only outputs "firstfield" and second field is never showed. I thought my foreach loop was messed but it's about the same code as used in makeEditors
Any ideas of what might be going on?
I'd like to get this working because our client really liked the utils found in the "nightly build" example (context menu, image resizer etc.).
By the way, I just updated my SVN version before testing this so my xinha code is up to date...
Offline