npm 模块
slate
-
- 需要同时配置 isInline : 不然默认是 block 元素
- 扩展类型定义
-
清空编辑器
const clearEditor = (editor: BaseEditor & ReactEditor) => {
editor.children.forEach(() => {
Transforms.removeNodes(editor, { at: [0] });
});
};- 编辑器插入
Transforms.insertNodes(editor, nodes);quilljs
typist : 基于 Tiptap 的编辑器。


Last updated on