pianello-api/resources/js/components/document-editor/index.js

18 lines
495 B
JavaScript
Raw Permalink Normal View History

(function () {
"use strict";
$(".editor").each(function () {
const el = this;
DocumentEditor.create($(el).find(".document-editor__editable")[0])
.then((editor) => {
$(el)
.closest(".editor")
.find(".document-editor__toolbar")
.append(editor.ui.view.toolbar.element);
})
.catch((error) => {
console.error(error);
});
});
})();