@opentiny/fluent-editor
Version:
A rich text editor based on Quill 2.0, which extends rich modules and formats on the basis of Quill. It's powerful and out-of-the-box.
34 lines (33 loc) • 1.33 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const action = require("./action.cjs.js");
const imageToolbarButtons = require("./image-toolbar-buttons.cjs.js");
const toolbar = require("./toolbar.cjs.js");
class ImageToolbarAction extends action.Action {
constructor(formatter) {
super(formatter);
__publicField(this, "toolbar");
__publicField(this, "buttons");
this.buttons = new imageToolbarButtons.ImageToolbarButtons({
buttons: formatter.options.toolbar.buttons
});
this.toolbar = new toolbar.ImageToolbar();
}
onCreate() {
const toolbar2 = this.toolbar.create(this.formatter, this.buttons);
this.formatter.overlay.appendChild(toolbar2);
}
onDestroy() {
const toolbar2 = this.toolbar.getElement();
if (!toolbar2) {
return;
}
this.formatter.overlay.removeChild(toolbar2);
this.toolbar.destroy();
}
}
exports.ImageToolbarAction = ImageToolbarAction;
//# sourceMappingURL=toolbar-action.cjs.js.map