MVC Html editor for custom designer

Posted by Community Admin on 05-Aug-2018 19:04

MVC Html editor for custom designer

All Replies

Posted by Community Admin on 25-Jul-2016 00:00

Hi,

I have a custom designer for my widget and I need to use an html editor for a specific field. I tried to use something like this without luck 

<sf-html-field sf-model="properties.MyHtmlField.PropertyValue" sf-template-url="/ResourcePackages/Bootstrap/client-components/fields/html-field/sf-html-field.sf-cshtml"></sf-html-field>

And nothing gets rendered.

I also have an image selector which works fine, but I can't make the html or rich text editor work. 

Thanks in advance.

Posted by Community Admin on 25-Jul-2016 00:00

Hi Ale.

In widget designer view you need to use this

<sf-html-field sf-model="properties.MyHtmlField.PropertyValue"></sf-html-field>

And in json file you need to add this component

"components" : ["sf-html-field"]

 

For deep understanding and better examples, you can check source code of built-in MVC widgets here: https://github.com/Sitefinity/feather-widgets

Posted by Community Admin on 25-Jul-2016 00:00

It works, thanks Victor!

This thread is closed