简体   繁体   English

追加后ckeditor即时加载

[英]ckeditor instant load after append

I am using this way to load ckeditor in my php page using class method:- 我正在使用这种方法使用类方法在我的php页面中加载ckeditor:-

<script type="text/javascript" src="../ckeditor.js"></script>

<textarea class="ckeditor" name="editor0_en"><?=$name;?>hellohello</textarea>

it works fine for the initial textarea. 它适用于初始文本区域。 Then, I tried to append more textarea with the same class after clicking a button, however, this time, I only can append a bare textarea without loaded with ckeditor. 然后,我尝试在单击按钮后在同一个类中附加更多textarea,但是,这一次,我只能在不加载ckeditor的情况下附加一个空textarea。

Would there be anyway that I can load the ckeditor appearance after appending? 无论如何,追加后我是否可以加载ckeditor外观? Thanks! 谢谢!

After appending a textarea use 附加文本区域后使用

CKEDITOR.replace(element);

it replaces a textarea or a DOM element (DIV) with a CKEditor instance. 它用CKEditor实例替换了textarea或DOM元素(DIV)。

See Official Documentation 请参阅官方文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM