租用问题

质量为本、客户为根、勇于拼搏、务实创新

< 返回租用问题列表

kindeditor赋值的有哪些方法,kindeditor获取内容

发布时间:2023-10-19 06:11:49

kindeditor赋值的有哪些方法

在 KindEditor 中,可以通过以下方法给编辑器赋值:

  1. 使用 html() 方法赋值:
var editor = KindEditor.create('#editor');
editor.html('

要赋值的内容

');
  1. 使用 text() 方法赋值(纯文本):
var editor = KindEditor.create('#editor');
editor.text('要赋值的内容');

需要注意的是,赋值操作应在编辑器初始化完成落后行,否则可能会致使赋值失败。