Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to load custom block with the JavaScript API #94

Open
nu1ww opened this issue Oct 27, 2023 · 3 comments
Open

trying to load custom block with the JavaScript API #94

nu1ww opened this issue Oct 27, 2023 · 3 comments

Comments

@nu1ww
Copy link

nu1ww commented Oct 27, 2023

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

`

@daveyvdgit
Copy link

have you found a way to do it?

@phoben
Copy link

phoben commented Jun 22, 2024

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

@kwanso-saif
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants