I have installed graphesjs and created custom template newly.but I want to edit existing template by using grapesjs.Is that feature include this awesome liabary? Is that can be achieve.?
the template/theme has to be a grapejs project
Hi @desilvaNSP
for import you can use this API:
var editor = grapesjs.init({...});
editor.setComponents('<div class="cls">Your template</div><style>...</style>');
// Or add CSS separately
// editor.setStyle('.cls{color: red}');
But GrapesJS is class-based so only CSS rules like these are parsed by the editor:
.class1 {...}
.class1.class2 {...}
.class1.class2, .class3 {...}
For example templates made with BEM methodology are perfect for GrapesJS
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi @desilvaNSP
for import you can use this API:
But GrapesJS is class-based so only CSS rules like these are parsed by the editor:
For example templates made with BEM methodology are perfect for GrapesJS