resolve #566 by moving Bootstrap declaration into theme

This commit is contained in:
Shaun Walker
2020-06-16 17:38:06 -04:00
parent 71b3b695fc
commit 7c24bae753
10 changed files with 110 additions and 39 deletions

View File

@ -5,27 +5,28 @@ Oqtane.RichTextEditor = {
quillElement, toolBar, readOnly,
placeholder, theme, debugLevel) {
const loadQuill = loadjs(['js/quill1.3.6.min.js', 'js/quill-blot-formatter.min.js'], 'Quill',
{ async: true, returnPromise: true })
.then(function () {
Quill.register('modules/blotFormatter', QuillBlotFormatter.default);
if (!loadjs.isDefined('Quill')) {
const loadQuill = loadjs(['js/quill1.3.6.min.js', 'js/quill-blot-formatter.min.js'], 'Quill',
{ async: true, returnPromise: true })
.then(function () {
Quill.register('modules/blotFormatter', QuillBlotFormatter.default);
})
.catch(function (pathsNotFound) { });
await loadQuill;
}
var options = {
debug: debugLevel,
modules: {
toolbar: toolBar,
blotFormatter: {}
},
placeholder: placeholder,
readOnly: readOnly,
theme: theme
};
var options = {
debug: debugLevel,
modules: {
toolbar: toolBar,
blotFormatter: {}
},
placeholder: placeholder,
readOnly: readOnly,
theme: theme
};
new Quill(quillElement, options);
})
.catch(function (pathsNotFound) { });
await loadQuill;
new Quill(quillElement, options);
},
getQuillContent: function (editorElement) {
return JSON.stringify(editorElement.__quill.getContents());