Breaking change
- Now requires GrapesJS v0.15.9 or higher
- Removed the following plugin options:
categoryLabel
modalTitleImport
modalBtnImport
modalLabelImport
modalTitleExport
modalLabelExport
You can now change these by overriding the i18n translation file, for example:
// old
pluginsOpts: {
[grapesJSMJML]: {
categoryLabel: 'custom category'
}
},
// new
import en from 'grapesjs-mjml/locale/en'
en['grapesjs-mjml'].category = 'custom category'
pluginsOpts: {
[grapesJSMJML]: {
i18n: { en: en }
}
},
Added
import 'grapesjs/dist/css/grapes.min.css'
import grapesJS from 'grapesjs'
import nl from 'grapesjs/locale/nl'
import grapesJSMJML from 'grapesjs-mjml'
import mjmlNL from 'grapesjs-mjml/locale/nl'
grapesJS.init({
fromElement: 1,
container : '#gjs',
avoidInlineStyle : false,
i18n: {
// locale: 'en', // default locale
// detectLocale: true, // by default, the editor will detect the language
// localeFallback: 'en', // default fallback
messages: { nl: nl },
},
plugins: [grapesJSMJML],
pluginsOpts: {
[grapesJSMJML]: {
// Optional options
i18n: { nl: mjmlNL }
}
},
});
Translation missing here? feel free to send a PR and we will merge it in!