Skip to main content
Level 2
Jun 7, 2024 6:32 AM UTC

Extending Basic Page Text Property and Converting to RTE

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:

 

For new page: 

 

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

12 replies

arunpatidar
Community Advisor
Community Advisor
Jun 7, 2024 7:26 AM UTC

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?

Translate
Arun Patidar
bkumar_Author
Level 2
Jun 7, 2024 8:54 AM UTC

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

Translate
arunpatidar
Community Advisor
Community Advisor
Jun 7, 2024 10:39 AM UTC

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

Translate
Arun Patidar
h_kataria
Community Advisor
Community Advisor
Jun 7, 2024 1:09 PM UTC

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

Translate
h_kataria
Community Advisor
Community Advisor
Jun 11, 2024 5:26 AM UTC
Level 2
Jun 9, 2024 2:41 PM UTC

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.

Translate
bkumar_Author
Level 2
Jun 11, 2024 4:54 AM UTC

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.

Translate
Keerthi0555
Level 5
Jun 10, 2024 4:46 AM UTC

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.

Translate
kautuk_sahni
Level 9
Jun 10, 2024 12:00 PM UTC

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

Translate
Kautuk Sahni
bkumar_Author
Level 2
Jun 11, 2024 5:47 AM UTC

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

Translate