Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Extending Basic Page Text Property and Converting to RTE

Avatar

Level 2

Hi,

I have extended description property in my base page component using below code for basic tab to make description field RTE from simple text.

<basic
jcr:primaryType="nt:unstructured"
jcr:title="Basic"
sling:orderBefore="article"
sling:resourceSuperType="wcm/foundation/components/basicpage/v1/basicpage/tabs/basic"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryTfype="nt:unstructured">
<column jcr:primaryType="nt:unstructured">
<items jcr:primaryType="nt:unstructured">

 

<moretitles jcr:primaryType="nt:unstructured">
<items jcr:primaryType="nt:unstructured">
<description
cq:showOnCreate="{Boolean}true"
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/richtext"
required="true"
useFixedInlineToolbar="true">
<rtePlugins jcr:primaryType="nt:unstructured">
<format
jcr:primaryType="nt:unstructured"
features="bold,italic"/>

 

Behavior on page property for existing page is as follows:

existing_page.png

 

For new page: 

new_page.png

 

Editing on existing page works fine but during new page creation it creates an issue.

 

Update: Our requirement is to display description in paragraph form with line breaks as it is authored on page properties. Right now it is being displayed in one long paragraph clustered together even if we add line breaks.

12 Replies

Avatar

Community Advisor

Hi @bkumar_ 
You have added a property, that might causing the issue?

cq:showOnCreate="{Boolean}true"

 Can you try adding one moew RTE field , just for testing and see, if you still face the issue?



Arun Patidar

Avatar

Level 2

Thanks for the suggestion but even after removing this property, it doesn't seem to work.

Avatar

Community Advisor

Can you check, if there is an error in the browser console?



Arun Patidar

Avatar

Level 7

This I believe is a known limitation for Rich text editor https://experienceleague.adobe.com/en/docs/experience-manager-65/content/sites/administering/operati... If it is really required then some custom javascript would probably be required.

Avatar

Level 2

Thanks for the response. I will check it out. I have also updated the query for our specific use case if you have any more insights, please do share. 

Avatar

Level 2

Hi ,

There is no name property added for description that is causing issue can u try by adding name field to description, it works fine.

Avatar

Level 2

Thanks for the suggestion. It is already picking the name field from sling:resourceType .I have tried adding name property here also but doesn't solve the issue.

Avatar

Level 6

Hi @bkumar_ ,

There is no name property added for description that is causing issue can u try by adding name field to description, it works fine.

Avatar

Administrator

@bkumar_ Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni

Avatar

Level 2

Hi @kautuk_sahni - issue is still not resolved. I have updated the query with our specific use case and waiting for more responses. TY!