Issue #571✓ SolvedOpened Nov 25, 2017by suraj7403 reactions

Import content dynamically

Quick answerby duskhacker2

@suraj740 editor.setComponents() will take both html/css, so you could just skip the setStyle call. As for the rest, you did look at the storage manager documentation, yes? You can call load/store on it programmatically without clicking a button, like editor.store(); editor.load()

Read full answer below ↓

Question

Hi @artf , how can i import content dynamically from program that automatically reflect in canvas.

Answers (3)

👍 Most helpfulduskhackerNov 27, 2017

@suraj740 editor.setComponents() will take both html/css, so you could just skip the setStyle call. As for the rest, you did look at the storage manager documentation, yes? You can call load/store on it programmatically without clicking a button, like editor.store(); editor.load()

duskhackerNov 27, 2017

In my project, I set data- attributes on an HTML element and extract them via .dataset in Javascript, once the editor is configured, I run: Be aware that the HTML must be set up so that grapesjs can understand it. I believe that it must adhere to the BEM(http://getbem.com/) standard. In practice, I...

duskhackerNov 27, 2017

@suraj740 ^^

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.