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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

P tag removal from text components

tc82
Level 4
Level 4

We want to remove the default p tag .

we are using the text components very heavily.

 

add our custom css to them. so in drop down we select the style and load that text component.

I want to remove the default p tage getting added.

 

below is my dialog.xml

 

 

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

    jcr:primaryType="cq:Dialog"

    xtype="dialog">

    <items

        jcr:primaryType="cq:Widget"

        xtype="tabpanel">

       

     

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

            <tab1

                jcr:primaryType="cq:Panel"

                title="Title, Text, Asset">

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

                    <title

                        jcr:primaryType="cq:Widget"

                        allowBlank="true"

                        fieldDescription="Enter a title"

                        fieldLabel="Title:"

                        name="./title"

                        xtype="textfield"/>

                    <titleSize

                        jcr:primaryType="cq:Widget"

                        allowBlank="true"

                        fieldDescription="In pixels"

                        fieldLabel="Title Font Size:"

                        name="./titleSize"

                        xtype="numberfield"/>

                    <view

                        jcr:primaryType="cq:Widget"

                        fieldLabel="View:"

                        name="./view"

                        sortDir="ASC"

                        type="select"

                        xtype="selection">

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

                            <megaNavView

                                jcr:primaryType="nt:unstructured"

                                text="Mega Nav View"

                                value="megaNavView"/>

                            <articleView

                                jcr:primaryType="nt:unstructured"

                                text="Article View"

                                value="articleView"/>

                            <homepageView

                                jcr:primaryType="nt:unstructured"

                                text="Homepage View"

                                value="homepageView"/>

                            <categoryHeaderView

                                jcr:primaryType="nt:unstructured"

                                text="Category Header View"

                                value="categoryHeaderView"/>

                            <breadcrumbView

                                jcr:primaryType="nt:unstructured"

                                text="Breadcrumb View"

                                value="breadcrumbView"/>

                            <rhmView

                                jcr:primaryType="nt:unstructured"

                                text="RHM View"

                                value="rhmView"/>

                            <caseStudyView

                                jcr:primaryType="nt:unstructured"

                                text="Case Study View"

                                value="caseStudyView"/>

                            <authorView

                                jcr:primaryType="nt:unstructured"

                                text="Author View"

                                value="authorView"/>

                            <imageRightView

                                jcr:primaryType="nt:unstructured"

                                text="Image Right View"

                                value="imageRightView"/>

                            <imageLeftView

                                jcr:primaryType="nt:unstructured"

                                text="Image Left View"

                                value="imageLeftView"/>

                            <featuredStatView

                                jcr:primaryType="nt:unstructured"

                                text="Featured Stat View"

                                value="featuredStatView"/>

                            <textRightView

                                jcr:primaryType="nt:unstructured"

                                text="Text Right View"

                                value="textRightView"/>

                            <textLeftView

                                jcr:primaryType="nt:unstructured"

                                text="Text Left View"

                                value="textLeftView"/>

                            <featuredContentView

                                jcr:primaryType="nt:unstructured"

                                text="Featured Content View"

                                value="featuredContentView"/>

                            <curvedImageView

                                jcr:primaryType="nt:unstructured"

                                text="Curved Image View"

                                value="curvedImageView"/>

                             <borderTextView

                                jcr:primaryType="nt:unstructured"

                                text="Text Border View"

                                value="borderTextView"/>

                              <normalBoldTextView

                                jcr:primaryType="nt:unstructured"

                                text="Normal Bold Text"

                                value="normalBoldTextView"

                               />

                              <redBoldText

                                jcr:primaryType="nt:unstructured"

                                text="Red Bold Text"

                                value="redBoldText"

                                />

                               <subTitleView

                                jcr:primaryType="nt:unstructured"

                                text="Sub title"

                                value="subTitleView"

                                />

                              

                               

                          

                        </options>

                      

                 

                  

                </items>

            </tab1>

        </items>

       

       

    </items>

</jcr:root>

1 Accepted Solution
smacdonald2008
Correct answer by
Level 10
Level 10

Extend the text component. Copy from /libs to /apps and then make the changes to the component's JSP to meet your business requirements. Read this article from super user Dan Klco - it will give you an idea how to extend components:

http://labs.6dglobal.com/blog/2013-03-06/consistent-and-clean-rich-text-and-images-cq5/

View solution in original post

2 Replies
tc82
Level 4
Level 4

thanks a lot for the help. I was able to extend the component and my changes.

yes

smacdonald2008
Correct answer by
Level 10
Level 10

Extend the text component. Copy from /libs to /apps and then make the changes to the component's JSP to meet your business requirements. Read this article from super user Dan Klco - it will give you an idea how to extend components:

http://labs.6dglobal.com/blog/2013-03-06/consistent-and-clean-rich-text-and-images-cq5/

View solution in original post