UNPKG

@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.

23 lines (22 loc) 834 B
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const Quill = require("quill"); require("../config/index.cjs.js"); const editor_config = require("../config/editor.config.cjs.js"); class FluentEditor extends Quill { constructor(container, options = {}) { super(container, options); this.isFullscreen = false; } get lang() { const i18nModule = this.getModule("i18n"); return i18nModule ? i18nModule.options.lang : editor_config.defaultLanguage; } getLangText(name) { const i18nModule = this.getModule("i18n"); if (!i18nModule) return editor_config.LANG_CONF[editor_config.defaultLanguage][name]; return i18nModule.options.langText[name]; } } exports.default = FluentEditor; //# sourceMappingURL=fluent-editor.cjs.js.map