vue-email-editor
vue-email-editor copied to clipboard
trying to load custom block with the JavaScript API
how can we create a custom block JSON? this is my sample code ?
<EmailEditor ref="emailEditor" :min-height="minHeight" :locale="locale" @load="editorLoaded" @ready="editorReady" />
This is the load function
` const editorLoaded = () => {
// This is the variable I need fill
let blocks = [];
emailEditor.value.editor.registerProvider('blocks', function (params, done) {
console.log('blocks provider', params);
done(blocks);
});
};
`
have you found a way to do it?
我也想知道,为什么示例中没有说明如何添加,blocks的数据结构是怎样的?
@phoben you can go to console.unlayer.com and make a custom block there to see its shape.