@leoyin/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.
28 lines (27 loc) • 1.14 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.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Quill = require("quill");
require("../config/index.cjs.js");
const i18n = require("../modules/i18n.cjs.js");
const editor_config = require("../config/editor.config.cjs.js");
class FluentEditor extends Quill {
constructor(container, options = {}) {
super(container, options);
__publicField(this, "isFullscreen", false);
}
static register(...args) {
super.register(...args);
}
get lang() {
const i18nModule = this.getModule("i18n");
return i18nModule ? i18nModule.options.lang : editor_config.defaultLanguage;
}
getLangText(name) {
return i18n.I18N.parserText(name, this.lang);
}
}
exports.default = FluentEditor;
//# sourceMappingURL=fluent-editor.cjs.js.map