0
0
Fork 0
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:
Dan Brown 2022-02-06 21:17:08 +00:00
parent 921131f999
commit ef211a76ae
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
9 changed files with 169 additions and 22 deletions
resources/js/components

View file

@ -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});