@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) • 676 B
JavaScript
import Quill from "quill";
import "../config/index.es.js";
import { defaultLanguage, LANG_CONF } from "../config/editor.config.es.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 : defaultLanguage;
}
getLangText(name) {
const i18nModule = this.getModule("i18n");
if (!i18nModule) return LANG_CONF[defaultLanguage][name];
return i18nModule.options.langText[name];
}
}
export {
FluentEditor as default
};
//# sourceMappingURL=fluent-editor.es.js.map