Replies: 2 comments 10 replies
-
To get a faster response, you should obfuscate your code, otherwise it's not challenging enough. But jokes aside, format your code accordingly and try to explain what you want to achieve. |
Beta Was this translation helpful? Give feedback.
1 reply
-
@zahidsoft But where do you store the css? I don't see it in your code. For me I did something similar using: getComponentHtmlCode(component) {
const code = component.getEl().outerHTML;
return this.cleanUpHtmlCode(code);
},
getComponentCssCode(component) {
return this.editor.CodeManager.getCode(component, 'css', {
cssc: this.editor.CssComposer,
});
},
cleanUpHtmlCode(code) {
const regex = /\s*(draggable|data-gjs-highlightable)=['"]true['"]/g;
return code.replaceAll(regex, '');
}, 2 - Inject code from DB to canvas -> editor.BlockManager.add(
......
content: `${YOUT_HTML_CODE}<style>${YOUR_CSS_STYLES}</style`>
......
) |
Beta Was this translation helpful? Give feedback.
9 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Beta Was this translation helpful? Give feedback.
All reactions