Text in New Line in Touch UI dialog | Community
Skip to main content
codingStar
Level 3
May 22, 2017 6:25 AM UTC
Solved

Text in New Line in Touch UI dialog

Hi,
 I have given fieldDescription. But all text coming in single line.
 What should I use for New Line?


                            <selectPath
                                jcr:primaryType="nt:unstructured"
                                sling:resourceType="granite/ui/components/foundation/form/pathbrowser"
                                fieldLabel="Mobile Image"
                                fieldDescription="Some Text In Line One. I want This text in Line Two. This Text in Line Three"
                                rootPath="/content"
                                name="./selectPath"/> 

Please suggest

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
antoniom5495929
antoniom5495929Accepted solution
Level 7
May 23, 2017 1:05 PM UTC

Hi,

you can do this just only inserting "new line" inside property. Without any special character but only using your submit button.

I've tried it in AEM 6.2 and it works.

6 replies

arunpatidar
New Participant
May 15, 2019 12:49 PM UTC

Yes, It is possible with granite text resource type but text creates span and which will be display in same line until we don't put CSS.

Translate
Arun Patidar
New Participant
May 15, 2019 11:36 AM UTC

I guess he suggests to add another property with the following text.

Example:

<text1 jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/text"
   text="first line"/>

  <text2 jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/text"
   text="second line"/>

Translate
Level 2
Jul 26, 2018 10:40 AM UTC

In my case, i've a requirement to include new line in the text present in Fieldlabel. What exactly needs to be done when u say add a new line property? Can you be more specific?

Translate
antoniom5495929
antoniom5495929Accepted solution
Level 7
May 23, 2017 1:05 PM UTC

Hi,

you can do this just only inserting "new line" inside property. Without any special character but only using your submit button.

I've tried it in AEM 6.2 and it works.

Translate
codingStar
Level 3
May 23, 2017 5:13 AM UTC

I have tried <br/>
and also <p> tags

but I did not get text in new line. Is there any other way to achieve this without css team.?

Translate
MC_Stuff
Level 10
May 23, 2017 1:55 AM UTC

Hi,

Discuss with your UI team for a proper css style.   Otherwise you can try with adding <br/>

Thanks,

Translate