Issue #1993💬 AnsweredOpened May 1, 2019by Ramkumar-Murugesan1 reactions

Is any way to store the html id with its component when i click save button

快速解答by artf1

@maryia-kabash IDs are created when required (added component-related style, component has scripts, etc.)

Read full answer below ↓

Question

Hi. I know the grapesjs will generate the unique id for each HTML. when I store that HTML and CSS. the HTML id is not stored in my database. so when i reloaded my saved data into grapesjs it shows new unique id for each HTML element.

before saving the HTML. we have id="i63ss1" as u can see in the below image

image

but after I saved and loaded into grapesjs it shows id="i3ibuf" in the below image

image

I want to load the same HTML id. is there any way to store the HTML id along with its HTML element

Thanks in Advance

Answers (3)

artfJanuary 23, 2020

@maryia-kabash IDs are created when required (added component-related style, component has scripts, etc.)

maryia-kabashJanuary 23, 2020

@artf JSON doesn't have ids as well (you can see it on GrapesJS Demo page). Is there any way to force saving ids?

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.