easy-markdown-editor
easy-markdown-editor copied to clipboard
Allow translations of button tooltips
This is a non-breaking change that allows to pass in translations and a wanted language as parameters to EasyMDE() in order to translate the toolbar buttons' titles that show up as tooltips. The code uses a simple replace() call, so the translation keys must exactly match the default english strings (including letter case, white spaces, etc.) to have the translations be applied.
Example:
const easymde = new EasyMDE({
language: 'de',
translations: {
de: {
'Create Link': 'Link einfügen',
},
},
});
If no language or translation was specified, or if no matching translation was found, then the original english string is used.