Issue #1679πŸ’¬ AnsweredOpened December 23, 2018by alialrabi0 reactions

How to render component in canvas using trait.

Quick answerby artf

In your doStuff method you're only getting the name of the trait, so nothing useful. I think if you change that checkbox trait in a simple input, you'll see the script changing correctly in the export code

Read full answer below ↓

Question

Hi Artf ,Thanks for your great tool,I have created test case for my problem
https://js.do/code/271771 I have created custom tool sidebar and create trait to render component with checkbox updates.

-To reproduce 1-drag sidebar component into canvas (it should print initial fname value in console) 2-open filter menu in classes style manager 3-check checkbox select fname 4-Then I want to render sidebar component in canvas with fname value 5-I would use this value as parameter to use in script after publish the page.

Answers (3)

artfβ€’ December 27, 2018

In your doStuff method you're only getting the name of the trait, so nothing useful. I think if you change that checkbox trait in a simple input, you'll see the script changing correctly in the export code

alialrabiβ€’ December 27, 2018

Thanks for your replay, Could you please explain more what should I do?What do you mean by ( change that checkbox trait in a simple input)? I have updated demo to be more clear https://js.do/alialrabi/273238 . There are two checkbox fname and lname ,So need to change the value of myModelPropName to...

lock[bot]β€’ January 2, 2020

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.