I am creating an app which allows the user to click on an editable content block, which opens fck in a modal window. Works great in IE, and it works great in FF, with the exception of the initial page load, and when the first content block is clicked. In other words, setHTML is not firing when the first click event is registered.
For the record, Firebug does not report an error of any kind.
The code:
Ext.onReady(function() { Ext.DomHelper.append(document.body,'<form><textarea id="fckEditor" name="fckEditor" class="fckEditor"> </textarea></form>', false); APP.init(); }); ... Ext.select('.editable').on('mousedown', function (e){ var blockData = this.innerHTML; .... try { oEditor = FCKeditorAPI.GetInstance('fckEditor'); oEditor.SetHTML( blockData ); } catch(err) { error(err.toString()); } } ...
I know the issue doesn't have to do with the fact that the fckEditor textarea is getting injected into the DOM, as I have tested the code with the markup directly in my page. Some images might clarify things a bit.
On the first click:
Every click thereafter:
Thank you in advance for anyone taking the time to respond. I appreciate it.
Re: oEditor.SetHTML fails on first click
Re: oEditor.SetHTML fails on first click
Re: oEditor.SetHTML fails on first click
Your code look's great,
I wanted to use your code, but, sorry you don't say which file
we do use, for adding your code.
Can you specify where we put your code please.
Personally I use FckEditor in Php, does your code working with it?
Thanks a lot
Re: oEditor.SetHTML fails on first click