Issue #1039πŸ’¬ AnsweredOpened April 12, 2018by dsgh0 reactions

Missing support for empty-name traits

Quick answerby lock[bot]

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.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, 2019

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

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.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.