Copied to clipboard

Flag this post as spam?

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


  • Joakim Millén 2 posts 73 karma points
    Nov 03, 2020 @ 09:08
    Joakim Millén
    0

    Fetch rich text editor data as JSON

    Is there a way via the API to fetch rich text from a rich text editor in some kind of JSON structure rather than as parsed HTML? Since we would like to do some custom parsing it would be smoother than to parse a HTML string.

  • Lindow 154 posts 1301 karma points
    Feb 08, 2021 @ 04:51
    Lindow
    100

    Hey Joakim.

    Not entirely sure what exactly you're trying to do.

    RTE in Heartcore returns a string containing HTML code e.g:

    "propertyEditorAlias": "<p>This is a paragraph</p>"
    

    and if you try to render it on the frontend as a string you'll get everything including the HTML tags.

    You'll need to specify in your code that it's not a normal text string.

    In Vue you can do this - https://www.geeksforgeeks.org/vue-js-v-html-directive/

    Docs - https://github.com/umbraco/Umbraco.Headless.StaticWebApp.Vue/blob/master/src/components/elements/TextAndImage.vue#L4

    Best, Darek

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies