+1-888-365-2779
Try Now
More in this section

Forums / Project Feather / MVC Html editor for custom designer

MVC Html editor for custom designer

3 posts, 0 answered
  1. Ale
    Ale avatar
    0 posts
    Registered:
    21 Jul 2016
    25 Jul
    Link to this post

    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.

  2. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    25 Jul in reply to Ale
    Link to this post

    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

  3. Ale
    Ale avatar
    0 posts
    Registered:
    21 Jul 2016
    25 Jul in reply to Victor Leontyev
    Link to this post
    It works, thanks Victor!
3 posts, 0 answered