Issue #2172💬 AnsweredOpened July 28, 2019by danrcoull2 reactions

Is there a way to do trait based placeholders

快速解答by zgover1

Your question isn't completely clear are what you're trying to achieve, but take a look at creating components.

Read full answer below ↓

Question

Hi Not sure if this is the correct place to ask.

trying to load the content of a textarea into this framework.

But allot of the links have placeholders within the default html such a <a href="{{placeholder for default url }}" is there a way to render this link within the canvas but leave the original html unmodified?

Answers (3)

zgoverJuly 29, 2019

Your question isn't completely clear are what you're trying to achieve, but take a look at creating components.

pouyamiralayiJuly 30, 2019

hi! for the select model you may use editor.Modal and as it's content, inject your desired logic for choosing and configuring your widgets. then you can inject the result widget using yourComponent.components(yourWidget) to fill the content of block with your widget. for the ajax rendering part, you can define some logic in the view property of your component type definition as well.

danrcoullJuly 29, 2019

Sorry Let me explain

take a cms widget such as {{widget name="test" type="\Php\Class"}}

Concenpt is to drag a block which opens a widget select model to choose a widget set the options and hit add that generates such as above. This needs to the ajaxly render to canvas, but leave the html with the above widget.

Ive done something similar for asset management, and got normal placeholders working but the variables in that widget may have different values

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.