Issue #1547πŸ’¬ AnsweredOpened October 29, 2018by ploutos270 reactions

How to add component attributes (before rendering)

Quick answerby artf

By what I see, from how you create blocks, it has nothing to do with the rendering of components, eg. parameters="null" is null because arrBlocks[j].value.parameters is null, that's all

Read full answer below ↓

Question

Hello, I'm looking to auto create components inside a block element and it seems that I manage to do that but with a small missing... How I can pass component attributes for each one ?? The code is below and it's create multiple blocks. Each block has different type of component. By passing the blcoks Array inside the component object I manage to print trigger the grapesjs to print each component but unfortunately without the attributes (check img at the end) Now since components are not render but they are generated as block I need to somehow store the attributes inside the model of each com...

Answers (2)

artfβ€’ November 2, 2018

By what I see, from how you create blocks, it has nothing to do with the rendering of components, eg. parameters="null" is null because arrBlocks[j].value.parameters is null, that's all

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