Missing support for empty-name traits
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Read full answer below βQuestion
version: 0.14.8
I marked this as a bug, but it could be understood as a missing feature as well. Basically, grapesjs-blocks-bootstrap4 has some traits with an empty name, given that those traits set the (bootstrap) classes of the elements. The problem is that, as I understand it, grapesjs did not expect traits to have empty names, and expected them to always map 1-to-1 with the element attributes.
This bug/missing feature might be detected by following these steps:
- Use the grapesjs-blocks-bootstrap4 plugin.
- Use the
index.htmlexample there - Make sure to enable the storageManager - Add any bootstrap block, eg: Alert
- In the
Component Settingspage, change one of its bootstrap props which change its class, eg: setcontexttoprimary - Reload the page so it re-reads from the storage
- Click the
View codebutton - This results in invalid html being shown:
<div ="alert-primary" class="alert alert-primary">This is an alertβcheck it out!</div>
Screenshot

Answers (1)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #980
[BUG] Related with task https://github.com/artf/grapesjs/issues/873
Hello, After restoring editor from db still have some part of bug present. It seems inside of script: function () traits will have old valu...
Issue #1037
[Bug] Devices with a percentage width not supported
version: 0.14.8Steps to reproduce the bugUse the grapesjs-blocks-bootstrap4 plugin.Use the index.html example there - Keep the default devi...
Issue #1699
[BUG] Link elements are not copyable/deletable
In the editor, if we have link element with some classes, the editor does not allow to copy/delete the element. GrapesJS version: v0.14.50S...
Issue #1051
[BUG] CommandAbstract's callRun and callStop should return result for backward compatibility
Hi @artf, after the latest upgrade (0.14.9) some of my commands that rely on the results of other commands fail. This happens because of th...
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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.