Copied to clipboard

Flag this post as spam?

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


  • Nathan Woulfe 422 posts 1580 karma points MVP 3x c-trib
    Aug 03, 2017 @ 07:03
    Nathan Woulfe
    0

    Extract RTE content from Grid editor

    Is it possible to programmatically extract the content of all RTE fields within a Grid editor? For this use-case, I need to do so against an IContent object.

    If I know the config in advance, I can always convert the string value to a JSON object and step through that, but what I need to be able to extract all the RTE content without knowing the data structure.

    Possible? Plausible?

  • Tom van Enckevort 100 posts 387 karma points
    Aug 03, 2017 @ 09:03
    Tom van Enckevort
    1

    You could just parse the property value as a JSON object and use some JsonPath to select all elements where the editor alias is rte. Then loop through that list and get the value for each element.

  • Nathan Woulfe 422 posts 1580 karma points MVP 3x c-trib
    Aug 03, 2017 @ 22:22
    Nathan Woulfe
    0

    How did I not know about JsonPath? Must have been living under a rock...

    Should do the trick, I think. Thanks.

  • 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