You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I added some custom compositions and blocks to my GJS project, and now I like to prepare a few presets that could be dragged and dropped - for example, I defined a custom wrapper with predefined styles and a custom block with predefined styles; now I would like to combine the two, tweak the styles and export the data in a format that I could add to the component model or block content.
I tried this: var editor = window.editor; let components = editor.getComponents(); let style = editor.getStyle(); let templateData = { components: components, style: style, }; JSON.stringify(templateData);
but it doesn't seem to work. Has anyone encountered this scenario before?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I added some custom compositions and blocks to my GJS project, and now I like to prepare a few presets that could be dragged and dropped - for example, I defined a custom wrapper with predefined styles and a custom block with predefined styles; now I would like to combine the two, tweak the styles and export the data in a format that I could add to the component model or block content.
I tried this:
var editor = window.editor; let components = editor.getComponents(); let style = editor.getStyle(); let templateData = { components: components, style: style, }; JSON.stringify(templateData);
but it doesn't seem to work. Has anyone encountered this scenario before?
Beta Was this translation helpful? Give feedback.
All reactions