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