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 9281715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:11:21+00:00 2026-06-18T18:11:21+00:00

We are using the Kendo UI Editor control. How can I force it to

  • 0

We are using the Kendo UI Editor control. How can I force it to only insert links that will open into a new window (i.e. target=”_blank”)?

This needs to be done in javascript, not Razor. I have tried getting it on the execute and select events, but neither have worked so far.

  • 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-06-18T18:11:23+00:00Added an answer on June 18, 2026 at 6:11 pm

    There are two ways to do this:

    1. Automatically check the “Open link in new window” checkbox in the “Insert link” dialog. Here is a sample implementation: http://jsbin.com/ekibud/1/edit. The idea is to subscribe to the execute event of the editor and if the command is “createlink” check the checkbox. Here is the required code:

      $("#editor").kendoEditor({
         execute: function(e) {
            if (e.name == "createlink") {
              setTimeout(function() {
                $("#k-editor-link-target").attr("checked", true);
              });
            }
         }
      });
      
    2. Find all links in the editor content and set their target attribute. This can be done via JavaScript and a regular expression replace:

      var editor = $("#editor").data("kendoEditor");
      
      var html = editor.value();
      
      // remove all existing target attributes
      
      html = html.replace(/<a[^>]*/, function(a) {
        // first remove existing target attribute
        a = a.replace(/target\s*=\s*['"][^"']*['"]/, '');
      
        // then add a target attribute
        a += ' target="_blank"';
      
        return a;
      });
      // Use the updated html
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Kendo open source Web UI. I have pop up window in
I'm trying to add new rows into a Kendo UI grid using a the
I'm using editor from Kendo UI, so I have big problem. I don't know
I am using the Kendo UI Editor widget. I want to paste the content
I am new to 'Kendo UI for ASP.NET MVC' and am currently using the
I am using kendo ui treeview widget control. I am dynamically getting the parents
I've put together a little app using Kendo UI that stores user inputs in
I am using RPNiemeyer kendo-knockout library. I have three view models that instantiate each
I have a cordova application that is using Kendo UI for the front end.
I am trying to use a Kendo UI Editor control in my ASP.NET MVC

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.