I need help in creating a plugin for rich text editor in cq5 to add an image, pdf, video, ppt or any file into rich text editor. | Community
Skip to main content
aalok_sarda
October 16, 2015
Solved

I need help in creating a plugin for rich text editor in cq5 to add an image, pdf, video, ppt or any file into rich text editor.

  • October 16, 2015
  • 3 replies
  • 925 views

Hi,

I need help in creating a plugin for rich text editor in cq5 to add an image, pdf, video, ppt or any file into rich text editor.

The existing rte plugins that are available are findreplace, undo, spellcheck, table etc

How to create a plugin to add a file to rich text editor?
The plugins are an ext js files. Appreciate if any one can suggest answer. It will be of great help.

Thanks

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 Sham_HC

TO create a plugin

*    Create a custom clientlib and extend the CQ.form.rte.plugins.Plugin object
*    override in the implementing plugin following methods as per your need:
getFeatures() returns an array of all the features that the plugin makes available.
initializeUI() adds the new button to the RTE toolbar.
notifyPluginConfig() displays title and text when the button is hovered.
execute() is called when the button is clicked and performs the plugin action: it displays a window that is used to define the text to be included.
*    Registers is your plugin using CQ.form.rte.plugins.PluginRegistry.register
*    Then use your custom plugin in all your rte.

3 replies

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

TO create a plugin

*    Create a custom clientlib and extend the CQ.form.rte.plugins.Plugin object
*    override in the implementing plugin following methods as per your need:
getFeatures() returns an array of all the features that the plugin makes available.
initializeUI() adds the new button to the RTE toolbar.
notifyPluginConfig() displays title and text when the button is hovered.
execute() is called when the button is clicked and performs the plugin action: it displays a window that is used to define the text to be included.
*    Registers is your plugin using CQ.form.rte.plugins.PluginRegistry.register
*    Then use your custom plugin in all your rte.

October 16, 2015

Aalok Sarda wrote...

Hi,

I need help in creating a plugin for rich text editor in cq5 to add an image, pdf, video, ppt or any file into rich text editor.

The existing rte plugins that are available are findreplace, undo, spellcheck, table etc

How to create a plugin to add a file to rich text editor?
The plugins are an ext js files. Appreciate if any one can suggest answer. It will be of great help.

Thanks