mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-07 09:30:58 +00:00
Made WYSIWYG editor translatable
- Created new translation file for editor view. - Added simple logic to format for tinymce. - Aligned some of the custom labels we were using.
This commit is contained in:
parent
921131f999
commit
ef211a76ae
9 changed files with 169 additions and 22 deletions
resources/js/components
|
@ -10,6 +10,7 @@ class WysiwygEditor {
|
|||
this.isDarkMode = document.documentElement.classList.contains('dark-mode');
|
||||
|
||||
this.tinyMceConfig = buildEditorConfig({
|
||||
language: this.$opts.language,
|
||||
containerElement: this.elem,
|
||||
darkMode: this.isDarkMode,
|
||||
textDirection: this.textDirection,
|
||||
|
@ -18,7 +19,8 @@ class WysiwygEditor {
|
|||
translations: {
|
||||
imageUploadErrorText: this.$opts.imageUploadErrorText,
|
||||
serverUploadLimitText: this.$opts.serverUploadLimitText,
|
||||
}
|
||||
},
|
||||
translationMap: window.editor_translations,
|
||||
});
|
||||
|
||||
window.$events.emitPublic(this.elem, 'editor-tinymce::pre-init', {config: this.tinyMceConfig});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue