2016-07-05 47 views
2

這將是巨大的,如果我們能禁止與殘疾人屬性primeNG編輯框,類似於什麼是可用一個textarea:能夠禁用primeNG編輯框

<textarea rows="3" cols="10" disabled="disabled"> 
This textarea is grayed out and disabled for interaction. 
</textarea> 

但可悲的是,不工作。你有一個想法,我該如何用p-editor(primeNG編輯器)來做到這一點?

回答

1

p-editor是引擎蓋下使用羽毛筆編輯器,你可以使用disable()方法:http://beta.quilljs.com/docs/api/#disable

你可以從組件與參考quill編輯:

@ViewChild(Editor) 
editor:Editor; // "Editor" is the prime-ng class definition 

,創造等的方法:

myMethod() { 
    this.editor.quill.disable(); 
}