How to create a custom RTE plugin just like paragraph formats | Community
Skip to main content
Level 2
October 30, 2023

How to create a custom RTE plugin just like paragraph formats

  • October 30, 2023
  • 2 replies
  • 3509 views

I would like to create a custom RTE plugin just like paragraph formats (it will have the dropdown) we see in the RTE where upon clicking of a particular text in that custom plugin I would like to print it to the console. And for that custom plugin also I would like to set an icon.

 

Just like this I would like to implement. 

 

Thank you.

 

 

2 replies

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 30, 2023

Hi,

 

Please refer to these articles where there is a good detail explanation about how to add a custom plugin for an RTE:

https://www.bounteous.com/insights/2022/01/06/custom-rich-text-editor-plugins-adobe-experience-manager

https://medium.com/globant/build-a-custom-rte-plugin-with-chatgpt-for-aem-4e373487a6fe 

 

Hope this helps

 

Esteban Bustamante
khaSHAAuthor
Level 2
October 31, 2023

@estebanbustamante 

 

I am getting this error.

 

 

So I am registering the plugin like this /libs/clientlibs/granite/richtext/core/js/plugins/ParagraphFormatPlugin.js and even in the paraformat in uisettings i kept the items just like it is there but instead of paraformat i changed to my own 'translate' which I have written.

 

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 31, 2023

Are you following the examples I shared? There's a downloadable package available for you to customize. It seems the error you're encountering stems from improper registration of certain JavaScript components. Based on the examples I provided, make sure to register your plugin under the category 'rte.coralui3'. Kindly verify this and make use of the resources I shared.

Esteban Bustamante
kautuk_sahni
Community Manager
Community Manager
November 1, 2023

@khasha Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

 

Kautuk Sahni