CKeditor with multible dynamic textareas

会有一股神秘感。 提交于 2019-12-02 09:48:58

I think you need to move CKEDITOR.replace('1'); inside the addTextArea() method enclosed in the else block before the return statement.

And also if you hard code the replace parameter to '1', it will only convert the first instance of textarea with id 1 to CKEditor and ignore others. Generate an Id dynamically and pass it to repalce method. Something like below,

var step = 'step'+counter; 

div = <textarea name='projSteps[]' id=step rows='10' cols='60'>; 

CKEDITOR.replace(step);

I haven't written the second step completely, I guess you can modify it as you need.

I'm working on a similar functionality and this approach works for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!