Closed aaflatooni closed 1 year ago
Hi @aaflatooni here you can see the actual code of the button block https://github.com/GrapesJS/preset-newsletter/blob/7e537e98b9bc949ed322fa6726f8b9458ef369d3/src/blocks.ts#L91 As you can see there are no default styles (the demo uses its own styles).
I'd suggest adding your own plugin at the end which would allow you to update all added blocks programmatically
plugins: [
// ...
// add your plugin at the end
(editor) => {
const buttonBlock = editor.Blocks.get('button');
buttonBlock.set({
content: `
<a class="button">Updated Button</a>
<style>
. button {...}
</style>
`,
});
}
]
We have GrapesJS with preset-newsletter implemented in our Vue3 application. When we try to add a button we only get an unformatted text saying button. We have noticed that the demo produces a nice looking button that can be edited. The style isn't being properly imported and wondering where we should look. Any ideas or suggestions would be greatly appreciated: