Problem with adding caption element block to the canvas
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)
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,...
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.
Issue #6409
Cannot drag to move components on mobile
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v133 Reproducible demo link https:/...
Issue #6324
sorter.setDragHelper is not a function on block drag
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? 131.0.6778.86Reproducible demo link https://...
Issue #3731
Text element not able to be selected twice after extended with events
Version: 0.17.25 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? Update a existing component o...
Issue #3243
Textable attribute not working and causing exceptions
Version: 0.16.27 to latest Are you able to reproduce the bug from the demo? Yes [ X] Yes [ ] No What is the expected behavior? insert text...
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.
Tutorial
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
GrapesJS Inline RTE Plugins Update: CKEditor 5 v0.1.4 and Froala Inline Text Editor
CKEditor 5 Inline for GrapesJS v0.1.4 fixes Studio SDK toolbar clipping, iframe injection and link balloon bugs. Compare with Froala Inline β both $69.
Tutorial
Embed GrapesJS in Your SaaS: A Weekend Guide
Embed GrapesJS in your SaaS and ship a white-label page builder over a weekend. Honest tradeoffs, real code, and the plugins that close the UX gap.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.