如何获取 quill editor 的最后一个索引?
How to get the last index of quill editor?
我想使用 quill editor 的 insertEmbed 方法在 quill editor 中的内容末尾插入内容。所以我需要做的是找到 quill 编辑器的最后一个索引,这样我就可以为第一个参数做 lastIndex + 1
:
insertEmbed(index: Number, type: String, value: any, source: String = 'api')
应该在内容的最后插入我想要的内容。
我搜索了文档,唯一看到的与我想要的相似的是 getLines。
有什么建议吗?
将此添加为索引:
quill.scroll.length()
Quill 有一个 getLength
方法:
quill.getLength()
我想使用 quill editor 的 insertEmbed 方法在 quill editor 中的内容末尾插入内容。所以我需要做的是找到 quill 编辑器的最后一个索引,这样我就可以为第一个参数做 lastIndex + 1
:
insertEmbed(index: Number, type: String, value: any, source: String = 'api')
应该在内容的最后插入我想要的内容。
我搜索了文档,唯一看到的与我想要的相似的是 getLines。
有什么建议吗?
将此添加为索引:
quill.scroll.length()
Quill 有一个 getLength
方法:
quill.getLength()