destroy() method removes textarea too

Added by Jay Gridley 10 months ago

I am calling destroy() method on existing elRTE editor instance...$('#menu-item-content').elrte('destroy'); and after that, textarea, which is wrapped, is removed too. Any help?

EDIT: If target is input field (not textarea), elRTE is succefully destroyed, but when should be created again, it is not.


Replies (2)

RE: destroy() method removes textarea too - Added by Jose Rilla 8 months ago

+1

I'm trying to destroy and re-create the editor, but whenever I destroy it the textarea is removed from the DOM too and I can't rebuild the editor again.

Did you find a workaround?

RE: destroy() method removes textarea too - Added by Troex Nevelin 8 months ago

just recreate it after elRTE destroy.

Get editor content, store it in variable, destroy elRTE, recreate textarea with saved content

(1-2/2)