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()等
我怎樣才能達到我剛剛創建的實例? 非常感謝。