vue-email-editor icon indicating copy to clipboard operation
vue-email-editor copied to clipboard

trying to load custom block with the JavaScript API

Open nu1ww opened this issue 1 year ago • 3 comments

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);
});
};

`

nu1ww avatar Oct 27 '23 11:10 nu1ww

have you found a way to do it?

Daveyvdweide avatar Nov 27 '23 14:11 Daveyvdweide

我也想知道,为什么示例中没有说明如何添加,blocks的数据结构是怎样的?

phoben avatar Jun 22 '24 03:06 phoben

@phoben you can go to console.unlayer.com and make a custom block there to see its shape.

kwanso-saif avatar Aug 27 '24 07:08 kwanso-saif