priya
priya

Reputation: 21

tinymce remove control- mceRemoveEditor

I have just two tinymce control - textarea. When I open my page first time, it opens fine but on reopening only first textarea comes properly. Remaining text areas dont have tinymce functionality. I am suspecting there is some issue in removing these controls.

I am removing controls using following line of code: tinymce.execCommand('mceRemoveEditor', true, 'my_original_textarea_id');

My tinymce version is 4.3.

Also,tinymce.editors.length gives me 7. is this the expected value?

Upvotes: 0

Views: 2539

Answers (1)

priya
priya

Reputation: 21

tinyMCE.execCommand('mceRemoveEditor', false, inputCtrl.id); tinyMCE.editors.length = 0;

Above two lines worked for me. Here inputCtrl.id is "id" of the control.

Upvotes: 2

Related Questions