resolve #566 by moving Bootstrap declaration into theme
This commit is contained in:
@ -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());
|
||||
|
Reference in New Issue
Block a user