Skip to content

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

@hemant3103

Description

@hemant3103

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions