Quill 2.0 dev 3 + better tables

This commit is contained in:
2019-09-30 21:12:09 +02:00
parent e347e134c0
commit b22ad457ca
12 changed files with 2538 additions and 2305 deletions
+22
View File
@@ -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();
+7 -7
View File
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