ConnectApiHelper icon indicating copy to clipboard operation
ConnectApiHelper copied to clipboard

getMessageSegmentInputs not working with "<p style="text-align: center;">Hello</p>"

Open hemant3103 opened this issue 4 years ago • 0 comments

We are using the lightning-input-rich-text(LWC) and when user using text alignment center|right that time <p style="text-align: center;">Hello</p> HTML is generating.

Post we are passing <p style="text-align: center;">Hello</p> HTML as param(inputText) to getMessageSegmentInputs method, but this piece of code String textSegment = inputText.substring(strPos, globalMatcher.start()); returning invalid HTML, hence system throwing error.

Output of textSegment post executing code: <p style="text-align: center;">Hello

Error: Error while parsing Rich Text Content: The markup in the document following the root element must be well-formed.

Could you please help us to resolve this issue.

@amerine @mars @vazexqi @jamesward @edmorley

Thank you, Hemant

hemant3103 avatar Jan 28 '22 14:01 hemant3103