Is it possible to replace a textarea/DOM element with an instance of CKEditor that already exists? Seems like the replace and appendto methods both will add a new instance of the editor to the CKEditor.instances collection.
I have a situation where an editor instance will be loaded into a textarea on the page with an id, then that portion of the page will be removed through ajax/javascript through a number of possible different methods, and then that portion of the page will be loaded again into a new textarea with the same id. Rather than coding to make sure all instances of the editor are destroyed upon each method of removing that portion of the page, I was considering the possibility of coding the editor to replace a textarea without creating a new instance so I wouldn't have to worry about errors from trying to create multiple instances with the same id.
Any hints or working examples would be greatly appreciated.
I have a situation where an editor instance will be loaded into a textarea on the page with an id, then that portion of the page will be removed through ajax/javascript through a number of possible different methods, and then that portion of the page will be loaded again into a new textarea with the same id. Rather than coding to make sure all instances of the editor are destroyed upon each method of removing that portion of the page, I was considering the possibility of coding the editor to replace a textarea without creating a new instance so I wouldn't have to worry about errors from trying to create multiple instances with the same id.
Any hints or working examples would be greatly appreciated.
Re: replace textarea without creating new instance?
Then you can create the new instance.