Grapesjs strips entities (mostly inserted by CKEditor)
I think the issue might be here https://github.com/artf/grapesjs/blob/0a122cd7b558bcf391cfd7e4608dffad3ba9de53/src/parser/model/ParserHtml.js#L169-L172 unfortunately nodeValue returns already processed string, without Try to use this option: https://github.com/artf/grapesjs/blob/0a122cd7b558bcf391cfd7e4608dffad...
Read full answer below βQuestion
Hi @artf , We have just noticed that, if you import this code into grapesjs: <label class="c3100 c3152 c3212" style="box-sizing: border-box;">My label field 1</label> <label class="c3111 c3163 c3223" style="box-sizing: border-box;">My label field 2</label> With an between the two label tags, the is being stripped from the code, leaving the two <label> tags "glued" together. I reproduced the issue with the Newsletter demo: If I put anything else between the two (even, sometimes... real spaces), everything is kept. Do you know if there's any explicit removal code some...
Answers (3)
I think the issue might be here https://github.com/artf/grapesjs/blob/0a122cd7b558bcf391cfd7e4608dffad3ba9de53/src/parser/model/ParserHtml.js#L169-L172 unfortunately nodeValue returns already processed string, without Try to use this option: https://github.com/artf/grapesjs/blob/0a122cd7b558...
Thank you very much for the tip @artf , this (undocumented?) Parser config option seems to solve my issue! Of course, I had to set it to true, not 0, as I wanted to keep those empty spaces ;) And had to set it on the editor.Parser.getConfig() object. Setting this option through grapesjs.init() has...
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.
Issue #1333
Bug in WebPage Demo
To reproduce: 1) Open https://grapesjs.com/demo.html in incognito mode. 2) Import this code: 3) Clear Canvas 4) Press Import. Result: The c...
Issue #1556
Add new block to block manager: predefined content and editor content is different
I try to use template engine with grapesjs. Add new block by this: Drag new block to editor then the content of editor is different from ab...
Issue #1471
Blockmanager and Image
Hi! I use this code to add a new block: blockManager.add("image", { label: 'Image', category: 'Basic', attributes: { class: "gjs-fonts gjs-...
Issue #493
Can i set content dynamically from block API ?
Hi @artf , very great web builder framework and keep it up :+1: code : As you can see, can i make tag dynamically from my backend? i use EJ...
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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.