Issue #2981💬 AnsweredOpened August 27, 2020by trony20200 reactions

GrapesJS deletes html attributes

快速解答by artf

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

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.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.