1

Been writing a lot of React with kotlin using the front end plugin. It has been amazing thus far doing nothing overly exotic. I am now trying to render stored HTML in my react component.

I am trying to use a plugin that has worked awesome writing regular react with no luck

@JsModule("react-render-html")
external fun renderHtml(html:String):ReactElement

Any ideas on how to do this, i wrote a cheap and easy parser to parse it but i wonder if there is a better way to use a library.

1 Answer 1

2

was very easy....

@JsModule("html-react-parser")
external fun htmlReactParser(html: String):String

then was able to use it:

    section {
        +htmlReactParser(html = chosen.content)
    }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.