Insert text field component in HTML | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SantoshSai
SantoshSaiAccepted solution
New Participant
Nov 18, 2022 2:42 AM UTC

@jeremy_josueba Use @ context='html'in your HTL

eg.

 ${model.text @ context='html'}

 

Santosh Sai

4 replies

SantoshSai
New Participant
Nov 18, 2022 2:11 AM UTC

Hi @jeremy_josueba ,

I am assuming that you are referring to those <p> which are generated when you type something in RTE and view source edit.

The default behaviour of AEM generates those <p> tags and can only be removed if you author only one paragraph by adding property removeSingleParagraphContainer

For more details please refer this article [0].

[0]: https://sourcedcode.com/blog/aem/aem-richtext-remove-p-tag-removesingleparagraphcontainer-for-touch-ui

Hope that helps!

Regards,

Santosh

Translate
Santosh Sai
Level 2
Nov 18, 2022 2:36 AM UTC

Now it stay like this

i need only show the text, in this case "descrption", not "<p>description</p>

Translate
SantoshSai
SantoshSaiAccepted solution
New Participant
Nov 18, 2022 2:42 AM UTC

@jeremy_josueba Use @ context='html'in your HTL

eg.

 ${model.text @ context='html'}

 

Translate
Santosh Sai