#2018: FCKeditorAPI is not cleaned up when removing editor instances manually
from
the page
----------------------+-----------------------------------------------------
Reporter: fredck | Owner: martinkou
Type: Bug | Status: assigned
Priority: Normal | Milestone: FCKeditor 2.6.1
Component: General | Version: FCKeditor 2.5
Resolution: | Keywords: Confirmed
----------------------+-----------------------------------------------------
Comment (by martinkou):
I've coded a RemoveInstance method under FCKeditorAPI that looks like
this:
{{{
'RemoveInstance : function( name )' +
'{' +
'var instance =
this.Instances[name] ;' +
'delete this.Instances[name] ;' +
'if ( instance &&
instance.GetInstanceObject )' +
'{' +
'var el =
instance.GetInstanceObject( "frameElement" ) ;' +
'el.parentNode.removeChild( el ) ;' +
'}' +
'}' +
}}}
This satisfies the requirement of the fckeditorapi test if the test case
was modified to use FCKeditor.RemoveInstance() instead of plain DOM iframe
removal.
However, this still doesn't solve the problem of shared objects (e.g. FCK)
being erased away and causing JavaScript errors in multiple editor
scenarios. Say, you run FCKeditorAPI.RemoveInstance( 'FCKeditor_1' ) in
sample11.html with the above function definition, and click the remaining
editing area. You'll get a bunch of JavaScript errors saying some shared
objects are no longer defined.
--
Ticket URL: <https://dev.fckeditor.net/ticket/2018#comment:7>
FCKeditor <http://www.fckeditor.net>
The text editor for Internet
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac