easy-markdown-editor icon indicating copy to clipboard operation
easy-markdown-editor copied to clipboard

Allow translations of button tooltips

Open pabzm opened this issue 3 months ago • 0 comments

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.

pabzm avatar Aug 26 '25 16:08 pabzm