Issue #2882πŸ’¬ AnsweredOpened July 8, 2020by ghost0 reactions

Problem with adding caption element block to the canvas

Quick answerby artf

Actually, HTML allows <caption> only inside <table>s (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption) so, the parser will always convert it in a text node, indeed the real issue is not the caption but the render of the text node in grapesjs. This will produce the same effect BTW, it should be fixed...

Read full answer below ↓

Question

Version: 0.16.18

Are you able to reproduce the bug from the demo? [x ] Yes https://jsfiddle.net/triawarman/tmcoqxhp/

What is the expected behavior? When drag "caption" block to canvas, will add element <caption>Insert text here</caption>

What is the current behavior? Adding text "Insert text here" directly to the canvas, even before drop "caption" block to the canvas.

Describe the bug detailed not adding "caption" element to the canvas

Answers (2)

artfβ€’ July 23, 2020

Actually, HTML allows <caption> only inside <table>s (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption) so, the parser will always convert it in a text node, indeed the real issue is not the caption but the render of the text node in grapesjs. This will produce the same effect BTW,...

ghostβ€’ July 28, 2020

hy @artf thanks for your reply. actually after <caption> problem, i found another problems with table, i cant drag and drop <tr> to the <table>, and <th> <td> to the <tr> the demo code is here: https://jsfiddle.net/triawarman/tpnco4v6/ i found simmilair issue at https://github.com/artf/grapesjs/iss...

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.