Opened 17 years ago
Closed 16 years ago
#2424 closed Bug (fixed)
API to destroy instances
Reported by: | Frederico Caldeira Knabben | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.0 |
Component: | General | Version: | FCKeditor 2.6.3 |
Keywords: | Confirmed | Cc: | Garry Yao |
Description
There must be a way to easily remove editor instances from the page, completely freeing resources used by those instances. This feature should be able to restore the <textarea> replaced by the instance, or remove it together with the editor.
Change History (4)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
Version: | → FCKeditor 2.6.3 |
---|
Any updates? A fix for this does not sound that complex. Drupal's Wysiwyg API does the following to achieve the desired result:
var editor = FCKeditorAPI.GetInstance(params.field); if (editor) { $('#' + params.field).val(editor.GetXHTML()).show(); $('#' + params.field + '___Config').remove(); $('#' + params.field + '___Frame').remove(); delete FCKeditorAPI.__Instances[params.field]; }
comment:3 Changed 16 years ago by
Cc: | Garry Yao added |
---|
comment:4 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
The "destroy" function has been introduced in V3 for this.
Oww. I searched the past hours for a function in FCKeditor that does exactly this.
I am developing Wysiwyg API for Drupal (core), and all editors must be able to attach/detach cleanly from textareas, since the user is able to change the editor based on an external selector.
I'll try to work around this limitation now, but it would be beneficial for FCKeditor 2.6 if there were save() and remove() instance methods, similar to what other editors like TinyMCE provide.