InsertLink dialog tabs inh rich text editor

Naresh Ede asked on March 13, 2018 13:09

Image Text

Image Text

Hi guys Please see the screenshots first

When we click on attachments icon in rich text editor, the InserLink dialog will opens. By default 5 tabs will open in that dialog, so my requirement is to customize that dialog and display only two tabs.

Any Ideas ??

Thanks

Nares Ede

Recent Answers


Trevor Fayas answered on March 13, 2018 14:26

If it's for a specific role you want to hide them, then you can use UI Personalization > Adminstration > CMS > Media Dialog > (Uncheck those that should not be shown)

If it's just for THIS particular tool you want to hide those, but still allow the user to get at the other spots, then that would involve modifying the CKEditor configuration in the /CMSAdminControls/CKEditor (/CMSAdminControls/CKEditor/plugins/CMSPlugins/plugin.js, may want to prettify it)

pluginInsertImageOrMedia: function(e) {
        var t = "InsertImageOrMedia",
            i = {
                exec: function(e) {
                    var t = window.unescape(e.config.MediaDialogWidth),
                        i = window.unescape(e.config.MediaDialogHeight);
                    CMSPlugin.currentEditor = e, CMSPlugin.openModalDialog(e.config.MediaDialogURL, "imageormedia", t, i)
                }
            },

You would have to try to find where the e.config.MediaDialogUrl is located and adjust it to point to a custom URL or append the parameters that would limit the items show.

0 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on March 13, 2018 15:46

The best way is to do it via widgets. There is already widget called Link. You can use as a start, if you don't like Link functionality and you really want to have tabs you need to use URL selector web part, made a widget out of it. Widgets are web parts with predefined settings. No programming should be involved.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on March 13, 2018 18:10

Good recommendation Peter, he'll still need to modify the UI Personalization (if enabled) to then disable the link button for those users, and/or modify the /CMSAdminControls/CKEditor/config.js to remove it from the toolbar, so the user only has the option of Link, but indeed a good way to go about it.

0 votesVote for this answer Mark as a Correct answer

Zach Perry answered on March 13, 2018 18:29 (last edited on March 13, 2018 18:31)

In the Field configuration for the form control, you can choose which tabs are displayed.

Go to advanced, then for the media dialog configuration, click configure. There will be a series of boxes you can uncheck to disable that given tab:

Image

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.