Replace/Override template for CategoryView?
Question
Hi,
Wondering if it's at all possible to use custom HTML to replace the CategoryView's template when adding a new block?
I've tried a couple things, but just based on the source code, I'm not seeing a way.
editor.BlockManager.add(name, {
category: {
view: {
template: '<div><h1>Layout</h1></div>',
render() {
this.$el.html(this.template);
return this;
}
}
},
...
});
Answers (1)
No, unfortunately, it's not possible but you can always create your own blocks container and using HTML5 D&D to drop stuff
Here you can find an example https://github.com/artf/grapesjs/issues/2595#issuecomment-593699277
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1078
add custom date time picker for countdown
For countdown we would like to add our custom datetime picker not just the html one.We tried adding click event in its trait this way trait...
Issue #1863
Adding new components to Block Manager
I'm trying to add multiple components which are in my canvas into the block manager but I believe because of an id issue they're not visibl...
Issue #2596
[QUESTION] Add html, css and js to Block Manager
[QUESTION] Hi! I'm retrieving dynamic html,css and js codes from the database. How can I create Blocks with this? Currently, this is my cod...
Issue #1472
[QUESTIONS] Custom Code block and JS
Wondering if there is a limitation or is it actually possible to create a block that allows the user of the editor to write custom javascri...
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.