Issue #1385💬 AnsweredOpened Aug 27, 2018by ionic6660 reactions

About the use of setAttributes

Quick answerby arthuralmeidap

so, in the second case do you want to update the same data-info attribute with a new key, right? since data-info has a string as a type value, first you need to get it and parse to an object. const dataInfoObject = JSON.parse(this.model.get('data-info')) after that, you can update the object with the new key dataInfoO...

Read full answer below ↓

Question

hi,I saved an object in the custom property。 And I want to implement putting values into custom properties。 but It will cover the previous one

Answers (3)

arthuralmeidapAug 30, 2018

so, in the second case do you want to update the same data-info attribute with a new key, right? since data-info has a string as a type value, first you need to get it and parse to an object. const dataInfoObject = JSON.parse(this.model.get('data-info')) after that, you can update the object with t...

artfAug 31, 2018

I thinks he's just looking for addAttributes

lock[bot]Sep 17, 2019

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.

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.