Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

<p> in richtext in touch UI

seethanan
Level 2
Level 2

Hi Team,

I am getting <p> appending in all the times in Touch ui.

I followed the document to remove, but still getting <p> .

any suggestions to remove that.

1 Accepted Solution
edubey
Correct answer by
Level 10
Level 10

Here's few thought:

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

The screenshot you shared is for format drop down you see in richtext and its has nothing to do with <p> tag generated

The default behavior of AEM generates those <p> tags and can only be removed if you author only one paragraph by adding property removeSingleParagraphContainer suggested above, how ever if you still want to removed those, I would suggest:

1. Customize RTE component and override this behavior.

2, Strip all <p> tags from the data you received from RTE in your JSP.

View solution in original post

6 Replies
edubey
Level 10
Level 10

Could you share the doc link which you followed and didn't worked ?

seethanan
Level 2
Level 2

edubey wrote...

Could you share the doc link which you followed and didn't worked ?

 

https://docs.adobe.com/docs/en/aem/6-0/administer/operations/page-authoring/rich-text-editor.html#Ac...

Here is my dialog

 <rtePlugins jcr:primaryType="nt:unstructured">

                                                        <paraformat jcr:primaryType="nt:unstructured">

                                                            <formats jcr:primaryType="cq:widgetCollection">

                                                                <paragraph 

                                                                    jcr:primaryType="nt:unstructured"

                                                                    tag="p"

                                                                    description="Paragraph">

                                                                </paragraph>

                                                            </formats>

                                                        </paraformat>

                                                    </rtePlugins>

 

If i missed some thing in dialog, sorry please correct me.

edubey
Level 10
Level 10

Can you try adding  removeSingleParagraphContainer = true in you rte properties and the author one paragraph in rte to see results

Documentation link: http://docs.adobe.com/docs/en/cq/5-6-1/widgets-api/index.html?class=CQ.form.RichText

seethanan
Level 2
Level 2

edubey wrote...

Can you try adding  removeSingleParagraphContainer = true in you rte properties and the author one paragraph in rte to see results

Documentation link: http://docs.adobe.com/docs/en/cq/5-6-1/widgets-api/index.html?class=CQ.form.RichText

 

i Changed but still am getting.

I attached my new dialog and nodes.

Please let me know if i need add some thing.

  <rtePlugins jcr:primaryType="nt:unstructured"

                                                    removeSingleParagraphContainer="true">

                                                            <paraformat

                                jcr:primaryType="nt:unstructured"

                                features="*">

                                <formats jcr:primaryType="cq:WidgetCollection">

                                    <p

                                        jcr:primaryType="nt:unstructured"

                                        description="p"

                                        tag="p"/>

                                    <h1

                                        jcr:primaryType="nt:unstructured"

                                        description="h1"

                                        tag="h1"/>

                                    <h2

                                        jcr:primaryType="nt:unstructured"

                                        description="h2"

                                        tag="h2"/>

                                    <h3

                                        jcr:primaryType="nt:unstructured"

                                        description="h3"

                                        tag="h3"/>

                                    <h4

                                        jcr:primaryType="nt:unstructured"

                                        description="h4"

                                        tag="h4"/>

                                </formats>

                            </paraformat>

                                                    </rtePlugins>[img]Screen Shot 2015-08-27 at 1.09.20 PM.png[/img]

edubey
Correct answer by
Level 10
Level 10

Here's few thought:

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

The screenshot you shared is for format drop down you see in richtext and its has nothing to do with <p> tag generated

The default behavior of AEM generates those <p> tags and can only be removed if you author only one paragraph by adding property removeSingleParagraphContainer suggested above, how ever if you still want to removed those, I would suggest:

1. Customize RTE component and override this behavior.

2, Strip all <p> tags from the data you received from RTE in your JSP.

View solution in original post

BrianKasingli
Community Advisor
Community Advisor
Installation of a new paraformat option, and using Java Backend, Sling Model, we can text-transform the output, so that your Sightly HTL can render the output Html as expected. For the full tutorial you can find it here.