Prevent saving component when getHtml is called. #5648
-
Hello! Additionally, I was considering whether it's possible to insert my inline JS just before closing the body tag. Can this be done? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You need to extend the toHTML method editor.Components.addType('you-custom-component', {
model: {
// ...
toHTML(opts) {
const someProp = this.get('someComponentProp');
const domAttributes = this.getAttrToHTML();
const innerHtml = this.getInnerHTML(opts);
// ..
return `<div>My custom HTML</div>`
}
},
});
Same thing as above, you need to extend the |
Beta Was this translation helpful? Give feedback.
You need to extend the toHTML method
Same thing as above, you need to extend the
wrapper
component.