在动态生成的输入上添加CKEDITOR



我在单击一个按钮时生成两个文本输入。在这里,我想在生成的两个元素上都添加CKEDITOR。这是我填充元素的代码

var html ='<div class="form-group" style="border:1px solid #eee;padding:3px;"><i class="fa fa-remove fa-remove-content-block" style="float:right;cursor:pointer"></i>';
html+='<input type="text" class="form-control" id="ckedit_new_add_content_title" name="section_title[]" required="required" />';
html+='<textarea class="form-control" id="ckedit_new_add_content_desc" name="suburb_content[]" style="margin-top:10px"></textarea></div>';
$(this).parent().append(html);    

有解决方案吗?

我认为您可能必须查看此回购。[.ceditor][1]

[1] :https://github.com/samcyn/CK_EDITOR-With-TABS动态创建的输入有自己的ckeditor实例。这将为您节省一些时间来查看它。向致以最良好的祝愿

最新更新