Hi there,
This is my first post on your forums seeing as I've never been involved in the development of FCKEditor.
However, I am the author of a jQuery plugin for FCKEditor, appropriately named "jQuery FCKEditor Plugin".
http://www.fyneworks.com/jquery/FCKEditor/
I am a frequent user of my own plugin (and FCKEditor itself, of course), specially in CMS implementations. Last week, whilst working with a CMS, I came across an issue with my plugin. The issue was that when the plugin would keep old FCKEditor instances in memory, even after the HTML had been removed. This happened because the CMS uses an Ajax driven interface where FCKEditors are created on demand without unloading the document. Over some time, this could easily accumulate to 100+ editors, in memory, not being used.
Today I added some code to my plugin that will look for instances pointing to elements that no longer exist and remove their JS reference from memory, but in doing this I'm not actually solving the problem of removing all the elements generated by FCKEditor - essentially, loads of hidden IFrames added to the bottom of the document.
Is there a method I can used to completely remove an editor from memory/DOM?
If not, would it be possible to 'mark' these IFrames in any way (ie.: <iframe class='fck-iframe'...>) so that I can removed them?
Thanks,
Diego A.
Thu, 07/31/2008 - 17:52
#1
Re: Destroying Editor
This is a problem with the current version. In the past we had all iframes together with the main iframe inside a single <div> just to make it easy. But, to fix some issues, things have be moved out of it.
We have always talked about that and we're planning to have it for the V3. I've opened a ticket for that to be sure we'll have it:
http://dev.fckeditor.net/ticket/2424
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: Destroying Editor
This seems to be the only problem because I examined FCKeditorAPI.Instances with Firebug and old instances are removed along with the HTML (I assume it's because the instances are stored onto the textarea element itself).
The only other (not-as-important) thing to consider is moving the FCK_ constants within the FCKeditorAPI namespace.
Thanks for your reply. I'll look forward to the future versions of FCKEditor.
Cheers,
Diego A.