BUG: Problem with adding caption element block to the canvas
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)
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
editor.Blocks.add('test', {
label: 'My block',
content: 'My text',
});
BTW, it should be fixed in the next release, thanks for the report
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/issues/1632 trying to add custom tollbar for table/cell, but maybe there's simple way or is this a bug too ?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2422
[BUG] Unable to add 'space' character if zoom is applied on canvas
Cannot edit text components properly if a zoom value is applied on the canvas. GrapesJS version:0.15.8 The issue can be reproduced in the d...
Issue #3134
BUG: Canvas scroll to top of the page when I try to drag an element from the last sections
Version: 0.16.27 Are you able to reproduce the bug from the demo? [ X] Yes [ ] No What is the expected behavior? When a try to drag a compo...
Issue #3579
BUG: RTE misplaced when opened right after dropping `activeOnRender` component
Version: 0.17.4 Are you able to reproduce the bug from the demo?[x] Yes[ ] No Steps to reproduce:Go to the demoDrop a "Text" block inside t...
Issue #3291
BUG (v0.16.41): the duplicate icon from the icon toolbar is modifying the original element too
Version: v0.16.41 Are you able to reproduce the bug from the demo? [ ] Yes What is the expected behavior? The elements duplicated not shoul...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.