Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7546003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:05:15+00:00 2026-05-30T09:05:15+00:00

Hi I am trying to make some changes to our implementation of CKEDITOR 3.6.2

  • 0

Hi I am trying to make some changes to our implementation of CKEDITOR 3.6.2

by removing all but 2 options in the link target type dropdown that appears in the link dialog’s target tab.

I tried to achieve this using the API but I am getting an error in the minified core ckeditor.js file in the dialog() method on this line X=S.lang.dir; where S is the editor.

The .lang property of the editor instance is undefined when doing CKEDITOR.dialog(editor, ‘link’), when viewing debugging the “editor” object I don’t see a lang object anywhere, so I’m not sure why this is missing? I didn’t work on our original implementation but as far as I know we have only added 2 plugins and not changed the ckeditor core.

Here is my code:

for (var i in CKEDITOR.instances) {
    var editor = CKEDITOR.instances[i];
    var dialogObj = CKEDITOR.dialog(editor, 'link');
    var linkDialogTargetField = dialogObj.getContentElement('target', 'linkTargetType');
    // API didn't seem to have a more efficient approach than clearing all and re-adding the one we want
    linkDialogTargetField.clear();
    linkDialogTargetField.add('notSet', '<not set>');
    linkDialogTargetField.add('_blank', 'New Window (_blank)');
}

I have managed to make my change without using the API properly by doing the below:

CKEDITOR.on('dialogDefinition', function (ev) {
    // Take the dialog name and its definition from the event
    // data.
    var dialogName = ev.data.name;
    var dialogDefinition = ev.data.definition;

    // Check if the definition is from the dialog we're
    // interested on (the "Link" dialog).
    if (dialogName == 'link') {
        // Get a reference to the "Link target" tab.
        var targetTab = dialogDefinition.getContents('target');

        var targetField = targetTab.get('linkTargetType');
        // removing everything except the 1st (none set) & 3rd (new window) options from the dropdown
        targetField['items'].splice(1, 2);
        targetField['items'].splice(2, 3); // the array is reduced by splice, so we have to splice from [2] onwards not from [4]
    }
});

but I don’t like this approach, does anyone have any ideas? or other ways to achieve the same result using the API?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:05:16+00:00Added an answer on May 30, 2026 at 9:05 am

    Using second approach and overwritten the dropdown items instead of splicing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make some changes to our Entity Framework model, which is causing
I'm trying to create a python program (using pyUNO ) to make some changes
I'm trying to make some text bold using HTML, but I'm struggling to get
I'm trying to make some social share buttons at my site, but the urls
We are trying to make all our blocks and pages static so that designer
I'm trying to give one our BA's the ability to make changes to a
I'm trying to make some changes to a questionnaire. Currently on each page there
We had one of our programmers make some changes that really don't make sense
I am trying to make some changes to an oracle database and have a
Trying to make some small changes to Apache's Velocity engine. Here's what I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.