Expand my Community achievements bar.

SOLVED

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

Avatar

Level 1

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.

1 Accepted Solution

Avatar

Correct answer by
Level 2

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/

View solution in original post

3 Replies

Avatar

Community Advisor

@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

Avatar

Correct answer by
Level 2

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/