Get Specific editable components and styles #3466
assadnazar
started this conversation in
General
Replies: 2 comments 1 reply
-
Hello, const editor = grapesjs.init({})
editor.on('storage:end:load', ({ components: c, styles: s }) => {
const components = JSON.parse(c)
const styles = JSON.parse(s)
console.log({
components,
styles
})
}) 🤔 Sources: |
Beta Was this translation helpful? Give feedback.
1 reply
-
What do you mean by "only editable components"? By default, the Storage stores and loads all the content in your canvas, if you need something custom try to check this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to know that how can I get only editable components and their styles when storage api is called. Right now, I have loaded a full html templates including html, head and body tags as well as local/external scripts and stylesheets. But what I want at the end is only the data-editable components.
Any idea on this?
Beta Was this translation helpful? Give feedback.
All reactions