Issue #493💬 AnsweredOpened November 8, 2017by bungambohlah0 reactions

Can i set content dynamically from block API ?

Quick answerby artf

You can update the block's content in this way

Read full answer below ↓

Question

Hi @artf , very great web builder framework and keep it up :+1: code : As you can see, can i make tag dynamically from my backend? i use EJS template for my view render engine and can passing data to ejs. Thank you very much and have a nice day

Answers (3)

artfNovember 8, 2017

You can update the block's content in this way

const dblock = blockManager.get('dynamic-nav');
dblock.set('content', `<ul>...`);
bungambohlahNovember 9, 2017

Oh i see , thank a lot @artf

bungambohlahNovember 10, 2017

Hi, @artf I have a problem, my dynamic-nav's block works now, but when I give some script to that component its give me an error . May I correct? if not please correct me, thank you very much That's my script :

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.