Issue #1039Opened April 12, 2018by dsgh0 reactions

[BUG] Missing support for empty-name traits

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.html example there - Make sure to enable the storageManager
  • Add any bootstrap block, eg: Alert
  • In the Component Settings page, change one of its bootstrap props which change its class, eg: set context to primary
  • Reload the page so it re-reads from the storage
  • Click the View code button
  • This results in invalid html being shown:
<div ="alert-primary" class="alert alert-primary">This is an alert—check it out!</div>

Screenshot

invalid_html

Answers (1)

lock[bot]September 17, 20190 reactions

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.