Issue #529πŸ’¬ AnsweredOpened November 15, 2017by krunal0390 reactions

Editor.setComponents(html) reset to default traits values on editor

Quick answerby artf

@krunal039 editor.getHtml() it's your FINAL output and obviously, there are no pieces of information about traits and other stuff. Store and use editor.getComponents() then, if you need the user to edit templates again.

Read full answer below ↓

Question

#522 thanks for all help was able to resolve via this.model.attributes. but now I have another issue, where editor.setComponents reset value in editor of html retrived to default traits values. Application flow 1) User redirected to grapesjs editor to edit page content, where they can use different components 2) On save editor.getHtml() saved to database and redirect user to page and new content will be retrived from db and displayed with selected component and values 3) User can choose to edit same page and redirected to editor page 4) On load page components retrieved from db and loaded on...

Answers (2)

artfβ€’ November 16, 2017

@krunal039 editor.getHtml() it's your FINAL output and obviously, there are no pieces of information about traits and other stuff. Store and use editor.getComponents() then, if you need the user to edit templates again.

lock[bot]β€’ September 18, 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.