How to add formatting functionality to text field in our component in aem | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Siva_Sogalapalli

My expectation was to create a tab in the dialog where user can select where the description has to display .. like completely left , middle and right


There is no limitation for that, you can use richtext field where ever you want. 

 

Please check below example where you can find dialog structure for richtext which is included at tab level:

https://gist.github.com/briankasingli/1a7e3e12deaa2e076645b09d30039b46

 

1 reply

Siva_Sogalapalli
Community Advisor
Community Advisor
November 8, 2021

Your question is not clear to me, but if you're exploring options to add formatting features , please explore on RTE which will help on you: 

 

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/components/text.html?lang=en

Hope this helps you to understand further.

vinuu123Author
Level 3
November 8, 2021

Hi sir, actually I created a component in that i had three fields name as image field, title field and description field, I want description text had alignment like left, right or centered. How can I had formatting property to that description text field. Can you suggest something about this

Siva_Sogalapalli
Community Advisor
Community Advisor
November 8, 2021

If you wanted to have formatting capabilities, YES you need to suggest Richtext field option. 

when you added richtext type filed, by default you will see some formatting plugins, and more can added /customised based on requirements.

please have a look at this as well so that you can quickly change field resource type on your local and see how it looks like.

https://gist.github.com/mattlo/d9f699e8142e00df99747772f3a486ba