Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Silvija 58 posts 172 karma points
    Jul 16, 2019 @ 11:29
    Silvija
    0

    Return CurrentUmbracoPage remove encoded text

    I am trying to use TinyMCE on the fronted of my website but i have problem when i make post request which dosent pass custom validation and than I return CurrentUmbracoPage whcih ruin my encoded text in RTE.

    This is how it looks before post request: enter image description here

    And after post request which Return CurrentUmbracoPage: enter image description here

    This is my model:

     [UIHint("tinymce_jquery_full"), AllowHtml]
     public string Text { get; set; }
    

    This is how i render text in RTE:

    EditModel.TextEn = HttpUtility.HtmlDecode(newsItem.Value<string>("text", "en-US"));
    

    It would solve my problem if i could have model property of type IHtmlString, but cant get it work.

Please Sign in or register to post replies

Write your reply to:

Draft