1 import {Component} from './component';
2 import {buildForInput} from '../wysiwyg/config';
4 export class WysiwygInput extends Component {
9 const config = buildForInput({
10 language: this.$opts.language,
11 containerElement: this.elem,
12 darkMode: document.documentElement.classList.contains('dark-mode'),
13 textDirection: this.textDirection,
15 imageUploadErrorText: this.$opts.imageUploadErrorText,
16 serverUploadLimitText: this.$opts.serverUploadLimitText,
18 translationMap: window.editor_translations,
21 window.tinymce.init(config).then(editors => {
22 this.editor = editors[0];