-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: tinymce internationalization #7363
base: main
Are you sure you want to change the base?
Conversation
dd56f8f
to
4ca7acf
Compare
|
||
return ( | ||
<Editor | ||
key={language} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TinyMCE doesn't support dynamic updates of translations after the editor is initialized, so we need to remount it
@@ -4,6 +4,7 @@ import { Editor } from "@tinymce/tinymce-react"; | |||
import PropTypes from "prop-types"; | |||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | |||
import tinymce from "tinymce"; // must import despite being unused | |||
import type { Editor as TinyMCEEditor } from "tinymce"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I never understood why tinymce must be imported despite being unused. Can the previous line be removed now that something else is imported from tinymce?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't check that, but type imports will be removed in compile time so those new imports doesn't change anything
4ca7acf
to
0d14c94
Compare
What this PR does
Fixes #7275
Add internationalization support to the TinyMCE editor used in Storybuilder. It follows a similar structure as language overrides. The translation files should be added to
languages/tinymce
in wwwroot.Test me
${language}.js
file towwwroot/languages/tinymce/${language}.js
Checklist
doc/
.