GrapesJS deletes html attributes
https://github.com/artf/grapesjs/issues/2973#issuecomment-682264998
Read full answer below βQuestion
Hello I start from: <table style="width:100%;height:100%" border="1" data-template="true"> ... <h4 data-fieldname="dateEventoString" data-gjs-editable="false" data-gjs-removable="false" > .... </h4> ... </table> but when i do editor.getHtml() the returned html is missing some original attributes ! Here the returned html: <table border="1" data-template="true" id="i8wv"> ... <h4 data-fieldname="dateEventoString"> ... </h4> ... </table> I need that GrapesJS leave attributes unchanged, is that possible? thanks, Walter
Answers (1)
Related Questions and Answers
Continue research with similar issue discussions.
Issue #384
Create and Edit Template into Database
This is my code to Create a new template and insert the inline html with style into the database : I am able to insert the template-data in...
Issue #507
UploadFile being called twice on drop file?
I have an editor initialized as so: If I add an image to the canvas and try to upload a new image by dragging it into the drop area in the...
Issue #2245
Save html with inline css server side
hello all , I am using version 0.15.3 and want to save html data with inline css to server side this is my code where I am storing html to...
Issue #974
Removing the deviceManager and ViewCode buttons
I'm playing with the default init to try and remove the deviceManager and ViewCode buttons... var editor = grapesjs.init({ showOffsets: 1,...
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
Messaging on gjs.market: talk to a studio before you buy, not after
We've launched private messaging between buyers and studios. One thread per buyerβstudio pair, the whole history in one place.
Tutorial
Vanilla GrapesJS vs GrapesJS With Plugins: What You Actually Get Out of the Box (2026)
New to GrapesJS? See exactly what the stock editor gives you, where it falls short, and which plugins close the gaps β a beginner-friendly 2026 comparison
Tutorial
Lighthouse for GrapesJS: Audit Accessibility and SEO Without Leaving the Editor
Live WCAG 2.1/2.2 accessibility auditor + SEO manager for GrapesJS. Every finding is bound to the exact component β click to select, then one-click fix.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.