Copied to clipboard

Flag this post as spam?

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


  • Evelina Björkman 2 posts 72 karma points
    Jan 15, 2025 @ 15:13
    Evelina Björkman
    0

    IContent get value from IHtmlEncodedString property

    Hi!

    I´m having trouble getting the content from my mainBody IHtmlEncodedString property from IContent in a INotificationHandler<ContentPublishedNotification> event.

    I have tried node.GetValue<IHtmlEncodedString>("mainBody") which returns null.

    When i try node.GetValue<string>("mainBody") i get {"markup":" Email test

    ","blocks":{"contentData":[],"settingsData":[]}}

    It´s the markup I wish to retrieve and display in an email that I will send out to subscribers when a page has been published.

    Thank you in advance!

  • 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