Umbraco.CMS.Backoffice
Umbraco.CMS.Backoffice copied to clipboard
[BUG]: Ensure support localization for aspects of TinyMCE plugins
I'm playing with the tinyMcePlugin
extension point and noticing that the text for the buttons is hardcoded.
For example the UmbTinyMceLinkPickerPlugin
has the tooltip hardcoded in the ctor.
Since TinyMcePluginArguments
contains the host element I'm guessing that we might be able to create a UmbLocalizationController
to be used when calling args.editor.ui.registry.addButton
?
const localize = new UmbLocalizationController(args.host);
args.editor.ui.registry.addButton('link', {
icon: 'link',
tooltip: localize.term('buttons_linkInsert'),
onAction: () => this.showDialog(),
});
Would that be correct?
There are also other parts to this:
- When adding a new
tinyMcePlugin
extension themeta.toolbar.label
is used in the TinyMCE configuration interface but can't use localization here (as far as I understand?) - The native buttons in TinyMCE might also need to be handled.