Issue #2014Opened May 13, 2019by alimajed931 reactions

[BUG] - Not able to get content of a link block

Question

Hello all,

I am using grapesjs version 0.14.52.

I am having the following issue: When I drop a link block inside the canvas, I can use the following linkModel.get("content"), to get the content of the link. But once I set a new content, using linkModel.set("content", "whatever"), linkModel.get("content") starts returning an empty string value.

I am able to set and read the attributes per example using the same get and set methods, and any other property, apart from content.

After checking the linkModel JSON, the content property has the correct value in the beginning, but for some reason is being set to empty on linkModel.set("content", "whatever"); the correct content value is being assigned to linkModel {components: [ { content: "whatever" }]}.

I am even not being able to see the property "content" in linkModel.changed on set, unlike the other properties.

Is anyone else facing this issue? Any idea what is wrong here and what should I change?

Now I am setting my personal property linkModel.set("ali-link", "whatever"), and I am able to get it normally using linkModel.get("ali-link").

Thank you

Answers (3)

prosenjit-mannaMay 14, 20191 reactions

Duplicate #2013

lock[bot]May 20, 20200 reactions

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.

lock[bot]May 20, 20200 reactions

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.