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 447 posts 1664 karma points MVP 5x hq 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 107 posts 429 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 447 posts 1664 karma points MVP 5x hq 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.

Please Sign in or register to post replies

Write your reply to:

Draft