Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Text field in AEM enhance components does not allow a different h tag after line break

Avatar

Level 3

sample screen.jpgHi all,

I am facing issue in text component para format icon disabled for below scenario, Any one can help to fix this issue.

  1. In Text component enter copy in the main text field (not the Title field, if the component has that). 
  2. Create a line break and type more copy.
  3. Attempt to change the h-tag setting on that new line of copy to a size other than "Paragraph;" Observe that the paragraph icon (¶) in the toolbar above the text field is grayed out and will therefore not allow user to make any changes to the h-tag. See attached screenshot for example. 

PFA also.

 

Thanks,

Mohan

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Are you using line break(Shift+Enter or <br>) or entering(Enter) to new line?



Arun Patidar

View solution in original post

20 Replies

Avatar

Community Advisor

If your second paragraph contains any List Items (1. xxx 2.ccc etc) , then this text will not come under Paragraphed and the Paragraph icon will disable,

If your second copy is plain text, then it will treat as Paragraph.

Avatar

Level 3
i am using plain text only and it's not contain any list atht time also paraformat icon hide.

Avatar

Community Advisor

@mohanasundaramp,

Can you please share with us the Granite UI XML configuration that you are using for the RichText?

Avatar

Level 3
<?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:EditConfig"> <cq:inplaceEditing jcr:primaryType="cq:InplaceEditingConfig" active="{Boolean}true" configPath="inplaceEditingConfig" editorType="text"> <inplaceEditingConfig jcr:primaryType="nt:unstructured"> <rtePlugins jcr:primaryType="nt:unstructured"> <tracklinks jcr:primaryType="nt:unstructured" features="*"/> <table jcr:primaryType="nt:unstructured" features="*"> <hiddenHeaderConfig jcr:primaryType="nt:unstructured" hiddenHeaderClassName="cq-wcm-foundation-aria-visuallyhidden"/> </table> <paraformat jcr:primaryType="nt:unstructured" features="*"> <formats jcr:primaryType="nt:unstructured"> <default_p jcr:primaryType="nt:unstructured" description="Paragraph" tag="p"/> <default_h1 jcr:primaryType="nt:unstructured" description="Heading 1" tag="h1"/> <default_h2 jcr:primaryType="nt:unstructured" description="Heading 2" tag="h2"/> <default_h3 jcr:primaryType="nt:unstructured" description="Heading 3" tag="h3"/> <default_h4 jcr:primaryType="nt:unstructured" description="Heading 4" tag="h4"/> <default_h5 jcr:primaryType="nt:unstructured" description="Heading 5" tag="h5"/> <default_h6 jcr:primaryType="nt:unstructured" description="Heading 6" tag="h6"/> <default_blockquote jcr:primaryType="nt:unstructured" description="Quote" tag="blockquote"/> <default_hr jcr:primaryType="nt:unstructured" description="Horizontal Rule (visual line break)" tag="hr"/> <default_pre jcr:primaryType="nt:unstructured" description="Preformatted" tag="pre"/> <default_strong jcr:primaryType="nt:unstructured" description="Strong" tag="strong"/> </formats> </paraformat> <misctools jcr:primaryType="nt:unstructured" features="specialchars"> <specialCharsConfig jcr:primaryType="nt:unstructured"> <chars jcr:primaryType="nt:unstructured"> <default_copyright jcr:primaryType="nt:unstructured" entity="&amp;copy;" name="copyright"/> <default_euro jcr:primaryType="nt:unstructured" entity="&amp;euro;" name="euro"/> <default_registered jcr:primaryType="nt:unstructured" entity="&amp;reg;" name="registered"/> <default_trademark jcr:primaryType="nt:unstructured" entity="&amp;trade;" name="trademark"/> <default_half jcr:primaryType="nt:unstructured" entity="&amp;half;" name="half"/> </chars> </specialCharsConfig> </misctools> <links jcr:primaryType="nt:unstructured" features="modifylink,unlink"/> <justify jcr:primaryType="nt:unstructured" features="*"/> <format jcr:primaryType="nt:unstructured" features="bold,italic,underline"/> </rtePlugins> </inplaceEditingConfig> </cq:inplaceEditing> </jcr:root>

Avatar

Community Advisor

Hi, you sent me xml for cq:EditConfig, but what I need is the XML configuration for cq/gui/components/authoring/dialog

Avatar

Level 3
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:Folder" sling:resourceSuperType="granite/ui/components/coral/foundation/form/field"/>

Avatar

Correct answer by
Community Advisor

Are you using line break(Shift+Enter or <br>) or entering(Enter) to new line?



Arun Patidar

Avatar

Community Advisor

It works for me, I just followed the steps you mentioned.

 

chrome-capture (4).gif



Arun Patidar

Avatar

Level 3
can you please enter more then 2 times after copy the text then try add text inside entered space.

Avatar

Community Advisor

can you tell me the steps again, description in your question is confusing?

 

chrome-capture (5).gif



Arun Patidar

Avatar

Level 3

1.Type some plain text

2.Copy the text then enter and do the header changes then

3.Enter 3 or 4 times for new line

4.Don't do type the text. Paste the copied text into entered first new line.

5.Then see able to do header change.

 

Note: As per my analysis after enter new lines it's appending div tag instead of p tag.

Avatar

Community Advisor

Working for me with the steps you mentioned.

 

Screenshot 2020-12-09 at 8.06.46 PM.png



Arun Patidar

Avatar

Level 3
i am using 6.5.5 service pack. OOTB it's working fine when we install the 6.5.5 service pack issue will occur. And also i tried with 6.5.6 service pack also.