Problem/Motivation

We would like to remove the "Advanced" tab from the CKEditor Dialog Window.

Issue fork wysiwyg-3227702

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sinduri_g created an issue. See original summary.

sinduri’s picture

sinduri’s picture

Status: Active » Needs review
klausi’s picture

Status: Needs review » Needs work

Thanks Sinduri!

I think this is not the correct approach. I just tested the settings in wysiwyg_ckeditor_settings():

'linkShowAdvancedTab' => FALSE,
'linkShowTargetTab' => FALSE,

And the 2 tabs get hidden correctly with ckeditor 4.x.

So it would be the best if we make config options for the link plugin in wysiwyg_ckeditor_settings_form(), then users can configure those 2 options in their editor profile?

sinduri’s picture

StatusFileSize
new2.16 KB
sinduri’s picture

Title: Remove Advanced Tab in CKEditor » Remove Advanced and Target Tabs in CKEditor
Status: Needs work » Needs review
sinduri’s picture

Hi Klausi,
Thanks a lot for the review. I changed the approach and created a new patch to give users the option to hide/show Advanced and Target tabs for Link plugin. Can you please review again.
Thank you very much!

klausi’s picture

Status: Needs review » Needs work

Thank you, this approach also works for me! Found some small problems:

  1. +++ b/editors/ckeditor.inc
    @@ -233,6 +233,8 @@ function wysiwyg_ckeditor_settings_form(&$form, &$form_state) {
    +    'linkShowAdvancedTab' => FALSE,
    +    'linkShowTargetTab' => FALSE,
    

    I think we don't want to change the default behavior from before - they should be TRUE per default and then users can change the setting.

  2. +++ b/editors/ckeditor.inc
    @@ -409,6 +411,30 @@ function wysiwyg_ckeditor_settings_form(&$form, &$form_state) {
    +    '#title' => t('Do not show advanced tab'),
    

    Thanks, but I think the logic is reversed: If I check the checkbox then the advanced tab is shown.

    Can we make this less confusing by avoiding negations?

    So use the name "Show advanced tab" - if it is checked then it should be shown. That also better matches the setting name "linkShowAdvancedTab". Same for the target tab.

sinduri’s picture

sinduri’s picture

Status: Needs work » Needs review
sinduri’s picture

Hi Klausi :)
Thank you very much for the feedback. I made the necessary changes. Can you please review again when you have the time?
Thanks a lot!

klausi’s picture

Version: 7.x-2.4 » 7.x-2.x-dev
Status: Needs review » Reviewed & tested by the community

Nice, looks good to me now!

Setting this to the dev version since it should be committed there.

sinduri’s picture

Thanks a lot Klausi for the support and the feedback! :)

steinmb’s picture

Assigned: sinduri » Unassigned

kunal_sahu made their first commit to this issue’s fork.

kunal_sahu’s picture

I have created an MR . please merge thanks

TwoD made their first commit to this issue’s fork.

  • TwoD committed ac5fbab7 on 7.x-2.x authored by kunal_sahu
    - #3227702 by sindurig, kunal_sahu, klausi: Remove Advanced and Target...
twod’s picture

Title: Remove Advanced and Target Tabs in CKEditor » Add opttions for Remove Advanced and Target Tabs in CKEditor
Status: Reviewed & tested by the community » Fixed

Thanks all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.