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
Solved! Go to Solution.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
Here are good articles that walks you through working with plugins:
http://blogs.adobe.com/contentmanagement/2013/08/22/customized-multifield-richtext-editor/
http://blogs.adobe.com/contentmanagement/2013/09/17/customized-multifield-richtext-editor-part-2/
http://scottsdigitalcommunity.blogspot.ca/2013/08/creating-cq-widget-that-supports-image.html
These will all give you a solid idea of how to work with a rich text editor in cq5.
Hope this helps.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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
Views
Replies
Total Likes