Upgrade - how to update old templates to the newest version?
Question
I have some templates that were generated with v0.14.5. How can I "upgrade" them to the latest version? They have classes attached and I see that the newest version doesn't add classes to the elements anymore.
Context: we use bespoke components and some defaults (e.g. draggable, resizable etc., style) have been changed.
If more details are required, I can provide them.
Thank you for this great project!
Answers (3)
They have classes attached and I see that the newest version doesn't add classes to the elements anymore.
I'm not sure what you're talking about, classes should be imported as before.
Context: we use bespoke components and some defaults (e.g. draggable, resizable etc., style) have been changed.
If your custom components were relying on some previous default property you would just need to update your components but honestly, I don't even remember such a change on any core component.
Let me see some template code not loading properly, please.
Hey, thanks for the quick response. Here is the template generated by v0.14.5 https://jsonblob.com/535ae06f-d4f6-11eb-8bc1-415e99da64cb
This is how it looks https://ibb.co/Zz8qg2J
We've changed some custom components' default attributes and style and changed the dragMode='absolute'. One of the issues is that the old components can't be moved around.
I can provide code samples if needed.
I've setup old vs new version for an existing template:
https://grapesjs-templates-upgrade.ciprianamariei.repl.co/0.14.5-old-template.html https://grapesjs-templates-upgrade.ciprianamariei.repl.co/0.16.45-old-template.html

Related Questions and Answers
Continue research with similar issue discussions.
Issue #5990
BUG: When you delete a component, duplicate classes between components will be deleted.
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 126.0.6478.127(Windows) Reproducibl...
Issue #2388
[Question] - How to import styles from <link> to be rendered when dragging block to canvas
My situation: I'm slowly importing some of my custom made UI components in ReactJS to GrapesJS. Now, I am able to render the component prop...
Issue #2825
How do I add my classes CSS file when using components?
I have this component: editor.BlockManager.add('rodape', { label: '3 Colunas', content: { tagName: 'div', draggable: true, attributes: { cl...
Issue #2679
[Question:] adding classname for custom DomComponent
[Question:] Hi, I have used this builder plugin in angular 7. This is very well structured and extendable. But I have some issue in define...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.