0

I am trying to use ViewComponents tag helpers in CKEditor to show some products but it doesn't.

I created a vc tag helper like this :

<vc:products html-class="col-12 col-md-5" html-style="" skip="0" take="10"></vc:products>

Now I am trying to use this code in CKEditor, I mean post editors can call products anywhere they want. but it doesn't work. CKEditor shows it as a html code.

what should I do?

Hatef.
  • 534
  • 4
  • 18

1 Answers1

0

This code will be actually executed on the server side and it will add partial html to your page then the server will return it to the client.

<vc:products html-class="col-12 col-md-5" html-style="" skip="0" take="10"></vc:products>

Here I'm not sure what you are trying to accomplish, but you cannot dynamically use tag helpers on the client side. May be this link can help you.

Dynamically Produce Razor Views at Runtime?