Issue #2367○ OpenOpened Nov 1, 2019by pouyamiralayi0 reactions

Objects in script interpolations

Open question

No community answers yet. Open the original discussion on GitHub to share your solution.

Question

Describe the bug (this is not happening in the latest version, this issue is not valid.) assume that we have a property in our component model which is an object. then try to interpolate this property in script: what you will get is a [object Object] string. Steps to reproduce the behaviorcreate a custom component type.inside model, create a property like this: `test:{a:1,b:2}inside model, create a script function.inside script function, create a variable like this: const test = '{[ test ]}'log the parsed value: console.log(JSON.parse(test))an error regarding JSON parsing will be shown. Expec...

Answers (0)

No answers yet.

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.