0
我使用Quill text editor作为我网站的文本编辑器,其中一个站点选项是创建动态文本编辑器,定义套筒编辑器的函数如下所示:Quill文本编辑器如何使用JQuery创建后使用实例
function quillDefine(quillID) //quillID is the id of the div that I'm going to define as quill element
{
var toolbarOptions =
[
['bold', 'italic', 'underline', 'strike'],
['blockquote'],
[{'align':[]}],
['clean']
]
var quill = new Quill('#'+quillID, {
modules: {toolbar: toolbarOptions},
theme: 'snow'
});
}
我该如何使用这个在其他funcitons中创建的套筒实例? 例如:
funciton getQuillInstanceText(quillID)
{
//I know I can use $('#'quillID).html(), but is that the proper way to do so?
}
我想用quill API functions像getContents()等
我怎样才能达到我刚刚创建的实例? 非常感谢。