Issue #2425💬 AnsweredOpened November 25, 2019by Ramkumar-Murugesan1 reactions

Custom traits is not saving in Remote storage manager

快速解答by artf1

I added more traits from the default input traits. but that traits are not saving in the grapesjs JSON metadata Traits shouldn't be stored, are not extensions of your Components but just a way to update your Components' props/attributes. The problem probably because you're not following the first rule

Read full answer below ↓

Question

I added more traits from the default input traits. but that traits are not saving in the grapesjs JSON metadata.

storageManager: {
              type: 'remote',
              autosave: false,
              autoload: false,
              stepsBeforeSave: 1,
              contentTypeJson: true,
              urlStore: ''http://localhost:8009/template/save"
          }

the above is my storage configuration in grapesjs init function.

image

the above image shows that I have custom traits called entity and its field after I saved and come back that those traits are not shown even though the name values also not showing in the traits name input box as shown in below images:

image

Answers (1)

artfNovember 29, 2019

I added more traits from the default input traits. but that traits are not saving in the grapesjs JSON metadata

Traits shouldn't be stored, are not extensions of your Components but just a way to update your Components' props/attributes. The problem probably because you're not following the first rule

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.