AddType problem, custom types doesn't work when editor init
No community answers yet. Open the original discussion on GitHub to share your solution.
Question
Notice some probleme with addType functionality If I create some custom type like this: When we add component widget on page , it work good But after save content to the server and reload page custom type doesn't apply because Parser don't have this type^ use only default types, so in widget type don't call isComponent method here: https://github.com/artf/grapesjs/blob/dev/src/parser/model/ParserHtml.js#L131 Do you know this bug? Possible solution is add some middleware here to add custom types and components to instance before call init https://github.com/artf/grapesjs/blob/dev/src/index.js#...
Answers (0)
No answers yet.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2614
Recursive view update of custom component
Hi, I have defined a custom type like: I want to keep the customTag in my model and show the content (HTML) in the view. However, in the co...
Issue #738
Image reverted to original size after resized
hi, i got a strange issue with component: i got 2 types, image and icon the issue is when i first drag and drop the image component, i'm ab...
Issue #1148
Script in component get messed up, any idea?
I created a component like const TWITTERTYPE = 'TWITTER'; domc.addType(TWITTERTYPE, { model: defaultModel.extend({ defaults: { ...defaultMo...
Issue #2697
Problem with custom component type and table cell
Hello! I'm trying to add custom component type: And also I'm adding new block: But when I drop this block on the canvas the <td> tag doesn'...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Related tutorials
In-depth guides on the same topic.
Tutorial
GrapesJS custom components guide (2026)
Define custom GrapesJS components with DomComponents.addType: detection with isComponent, a model with traits and defaults, and a view for canvas behavior.
Tutorial
How to add a custom block in GrapesJS (2026)
Add custom drag-and-drop blocks to GrapesJS with the Block Manager: content, categories, media icons, and reusable component-backed blocks.
Tutorial
Integrating GrapesJS into a Vue 3 App — Complete Guide for 2026
Build a Vue 3 landing page builder with GrapesJS and Vite. Custom blocks, composables, remote storage, TypeScript & production tips. Updated for 2026.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.