SVG Not rendering when inside any HTML Element
I keep having this problem in version 0.17.19
Read full answer below βQuestion
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Version 94.0.4606.81 (Official Build) (64-bit)Reproducible demo link https://grapesjs.com/demo.htmlDescribe the bug How to reproduce the bug? Add any SVG directly it will be visible in the canvas - then wrap the same SVG element inside DIV / SECTION / UL / LI once it's wrapped it is not visible in canvas. What is the expected behavior? SVG elements must be visible in the canvas What is the current behavior? SVG elements not rendering - when wrapped inside HTML Blocks DIV/ SECTION/ ... Insert the fol...
Answers (4)
I keep having this problem in version 0.17.19
I'm sorry I just spelled it wrong. I meant 0.17.29.
Thanks for the report @inventorbit
I can see an issue in parsing the <path> tag. I'll investigate and try to fix it for the next release.
Thanks for reporting this, @inventorbit. Great question about SVG Not rendering when inside any HTML Element. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on() event listener method Most opera...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5378
Uncaught TypeError: Cannot read properties of undefined (reading 'Canvas') while dragging a component in Layer Manager Panel
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v116.0.5845.97 Reproducible demo li...
Issue #4208
Style click state bug in every element
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Brave Last, tested on chrome last and Safa...
Issue #3794
RTE Overlapping text In Basic Text Component when Width & Height are 100% of Canvas
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 93.0.4577.82 (Official Build) (64-...
Issue #6348
It's possible to drag and drop literally anything inside grapesjs canvas
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome Reproducible demo link https://grap...
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
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins β TinyMCE Inline Text Editor and Placeholder.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.