0
正如標題所說,無論如何要在quill
上初始化後添加顏色?我可以訪問編輯器變量。如何在編輯器初始化後添加自定義顏色
var Colors = ['black','white];
// ...
var TOOLBAR_CONFIG = [
['bold', 'italic', 'link', { 'color': Colors }, { 'list': 'bullet' },
{ header: 1 }, { header: 2 }, 'image'
]];
QuillEditor = new Quill('#'+this.props.id, {
bounds: '.cnt',
theme: 'bubble',
modules: {
toolbar: TOOLBAR_CONFIG
}
});
// ...
// Somewhere else in a action listen i would like to add a custom color, e.g:
myhandle(){
Colors.push('blue');
// I tried looking at QuillEditor.getModule('toolbar'); but could not see any event?
}
感謝