Extending Basic Page Text Property and Converting to RTE | Community
Skip to main content
Level 2
June 7, 2024

Extending Basic Page Text Property and Converting to RTE

  • June 7, 2024
  • 5 replies
  • 1799 views

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.

5 replies

arunpatidar
Community Advisor
Community Advisor
June 7, 2024

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
bkumar_Author
Level 2
June 7, 2024

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

arunpatidar
Community Advisor
Community Advisor
June 7, 2024

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

Arun Patidar
h_kataria
Community Advisor
Community Advisor
June 7, 2024

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.

h_kataria
Community Advisor
Community Advisor
June 11, 2024
Level 2
June 9, 2024

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.

bkumar_Author
Level 2
June 11, 2024

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.

Keerthi0555
Level 5
June 10, 2024

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.

kautuk_sahni
Community Manager
Community Manager
June 10, 2024

@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
bkumar_Author
Level 2
June 11, 2024

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