Apologies if my knowledge of javascript and DOM are not expert, I have only been working with them for a short while.
We have a situation where some complex tables have been created using FCKEditor, and some of the original content was pasted from Word, and has multiple Font and other tags that need to stripped out. Some of these are large, and can take 3 minutes to load.
I wrote a screen that has an instance of FCKEditor, where the content can be pasted in, and a button on the form executes a javascript function that strips off all unwanted tags.
Using Firebug, I can see that the content of my FCKEditor window has been extracted into javascript, and I can also see that oEditor.SetHTML=HTMLString2; has updated with the new value, however the screen does not refresh.
I saw in the API that there is an event OnAfterSetHTML but I don't know how I would use it in this situation.
I would be grateful if someone could please help point me in the right direction. I think I am very close.
Thanks
We have a situation where some complex tables have been created using FCKEditor, and some of the original content was pasted from Word, and has multiple Font and other tags that need to stripped out. Some of these are large, and can take 3 minutes to load.
I wrote a screen that has an instance of FCKEditor, where the content can be pasted in, and a button on the form executes a javascript function that strips off all unwanted tags.
Using Firebug, I can see that the content of my FCKEditor window has been extracted into javascript, and I can also see that oEditor.SetHTML=HTMLString2; has updated with the new value, however the screen does not refresh.
I saw in the API that there is an event OnAfterSetHTML but I don't know how I would use it in this situation.
I would be grateful if someone could please help point me in the right direction. I think I am very close.
Thanks
Re: How To Update Editor Content And Redisplay
Seems a bit of a waste, since I can apparently update the editor window content using javascript, but can't get it to appear.
I am at a loss as to how to resolve this.
Re: How To Update Editor Content And Redisplay
My problem was that even though I used:
and I could see that the value had changed (Firebug), the display did not change.
I added two lines to my script as follows:
which basically hide and re-display the editor division on the page.
The display flickers slightly, but it does the trick and by some miracle displays the modified text content.
I hope this proves useful to someone, but if you do find a way of modifying the text without having to do this, please let me know.