How to add a custom button in rte plugin/cq?
The below path is for hyperlink
/apps/cq/ui/widgets/source/widgets/form/rte/plugins/LinkDialog.js
I need to add a custom button in rte plugin to extend the hyperlink functionality?
To provide a new button/plugin in RTE, a new clientlib will have to be created. In the js file, the intended functionality of button can be implemented in ExtJs. In CSS file, the appearance/image of thee button can be specified.
Then the newly created clientlib can be registered as a plugin for RTE by using following line :
CUI.rte.plugins.PluginRegistry.register("pluginName",ClientlibName.PluginName.Plugin);
The entire process has been described step by step in this excellent article.
Related
I want to access the buttons of the dialog box which come up after clicking on insert/edit link button plugin in tinyMCE.
I want to add a custom save function to it. Is there any way to access those buttons?
I have tried to find a way in documentation, but no luck
I have a editable template. on the template, i am adding a component called contact us which intern adds button component to the parsys. I am able to edit/configure contactus component but I am unable to edit/configure button component which is added inside contact us component. It is not working on the editable template. But it works on the page level.
I've created a custom xtype that I want to use in a page property dialog. It works great when I bring up the page and select page properties from the sidekick, but I can't figure out where to place the custom javascript I've created so its available from the sites menu in the main page. There the custom xtype fails to load and the new section fails to work.
You need to place your script inside a new clientlib, defined with the category cq.wcm.admin. All clientlibs with this category are automatically included on the site admin. If you add the category cq.wcm.edit, your script will be included on the page editor as well.
I have a website that you can insert an image onto. I use tinymce for the editor and the insert image function works great.
However I can't find a way for the user to be able to click on the image and see a full size version of it.
I'd like it to popup in a dialog on the page and not open in another window.
Is this a function that is available within tinymce or is it something I need to code in?
This is a function that is avaiable. You can use tinymce popups. Be aware that you need to add inlinepopups to the plugins and 'dialog_type: "modal",' to your tinymce init.
As example of how to use a tinymce popup you might want to have a look at the searchreplace plugin code in the plugins directory which uses a tinymce popup.
I'm adding a ckeditor to my form using the onclick functionality - i.e., when the user clicks a button, the ckeditor is added to the form.
I'm echoing out the html generated when a ckeditor is added to a page through the javascript function.
The ckeditor is added, but the text area cannot be modified.
is it because i'm adding the html to generate the ckeditor as :
ckeditor.innerHTML = '......';
is there another way to add a ckeditor to my form using the javascript onclick (like: onclick="addCKEditor();")
Thanks!
using CKEDITOR.replace('id) after adding the textarea to the DOM - within the javascript function, got the job done.