Quill 2.0 dev 3 + better tables
This commit is contained in:
@@ -414,6 +414,8 @@ function CATC(asGlobals)
|
||||
}
|
||||
}
|
||||
|
||||
Quill.register({'modules/better-table': quillBetterTable}, true);
|
||||
|
||||
class Editor {
|
||||
constructor(sEditorId, bReadOnly) {
|
||||
this.keystrokes = 0;
|
||||
@@ -430,6 +432,19 @@ class Editor {
|
||||
placeholder: 'Notes',
|
||||
readOnly: bReadOnly,
|
||||
modules: {
|
||||
table: false,
|
||||
'better-table': {
|
||||
operationMenu: {
|
||||
items: {
|
||||
unmergeCells: {
|
||||
text: 'Another unmerge cells name'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
keyboard: {
|
||||
bindings: quillBetterTable.keyboardBindings
|
||||
},
|
||||
toolbar: [
|
||||
['bold', 'italic', 'underline', 'strike'],
|
||||
//['blockquote', 'code-block'],
|
||||
@@ -443,11 +458,18 @@ class Editor {
|
||||
//[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
|
||||
//[{ 'font': [] }],
|
||||
[{ 'align': [] }],
|
||||
['table'],
|
||||
['link', 'image'],
|
||||
['clean']
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
var oToolbar = this.oQuill.getModule('toolbar');
|
||||
oToolbar.addHandler('table', () => {
|
||||
let tableModule = this.oQuill.getModule('better-table');
|
||||
tableModule.insertTable(3, 3);
|
||||
});
|
||||
|
||||
this._initEvents();
|
||||
this._postInit();
|
||||
|
||||
Vendored
+7
-7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user