How to create custom RTE plug-in for changing font size of selected word or sentence in Text component (AEM 6.4.8) | Community
Skip to main content
June 30, 2022
Solved

How to create custom RTE plug-in for changing font size of selected word or sentence in Text component (AEM 6.4.8)

  • June 30, 2022
  • 3 replies
  • 1242 views

Hi, 

I need an implementation process of custom RTE plug-in for font size change of the selected word or sentence available inside text field of text component. This feature is available into RTE option of this message body(T). Please suggest the process.

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 Mohit_KBansal

Please note that the RTE plugin I have published [1] was tested on 6.3, and may not work on 6.5, but this article [1] can be used to create a new plugin and the concept is the same. I will try to update the plugin.

 

[1] https://mkbansal.wordpress.com/2016/01/09/aem-rte-custom-styles-plugin-touch-ui/

3 replies

SantoshSai
Community Advisor
Community Advisor
June 30, 2022

Hi @user03109 ,

Please visit this article to create custom plugin for RTE: https://www.bounteous.com/insights/2022/01/06/custom-rich-text-editor-plugins-adobe-experience-manager/

Hope that helps!

Regards,
Santosh

Santosh Sai
ShaileshBassi
Community Advisor
Community Advisor
June 30, 2022

@user03109 AEM RTE OOB provide a Styles plugin which allow you to apply custom css class on selected text in RTE. Styles plugin is a good way to add custom class around any text and is easy to configure though this plugin has some limitation:

  1. This plugin is limited to one style for a selected text. We can not apply multiple styles on same text. eg. An editor can not apply UpperCase Style along with Primary Color style on same text.
  2. Styles once applied, can not be removed, rather will be replaced by some other style.

This bring a need to have multiple plugins similar to Styles plugin eg. fontstyle, fontcolor & fontsize. So that we can easily decorate our content with correct style.

Reference: https://mkbansal.wordpress.com/2016/01/09/aem-rte-custom-styles-plugin-touch-ui/

https://aem4beginner.blogspot.com/touch-ui-rte-html-element-selector

Thanks

Mohit_KBansal
Adobe Employee
Mohit_KBansalAdobe EmployeeAccepted solution
Adobe Employee
June 30, 2022

Please note that the RTE plugin I have published [1] was tested on 6.3, and may not work on 6.5, but this article [1] can be used to create a new plugin and the concept is the same. I will try to update the plugin.

 

[1] https://mkbansal.wordpress.com/2016/01/09/aem-rte-custom-styles-plugin-touch-ui/