Jump to content

target="_blank" globally


fruid
 Share

Recommended Posts

1 hour ago, fruid said:

Can I automatically add the attribute target="_blank" to all links created in a CKeditor body field?

Are you really sure you want to add that to every single link? What about email links? Anchor links? Links to internal PW-pages?

If so, you could inject these with a hook, or via JS; but if you have lots of pages and RTE fields, that might not be the most efficient approach.

But apparently, you can also configure CKEditor to do what you want:
https://ckeditor.com/old/forums/CKEditor/Set-link-default-target-to-new-window-blank
https://ckeditor.com/docs/ckeditor4/latest/guide/dev_howtos_dialog_windows.html
http://handsomedogstudio.com/ckeditor-set-default-target-blank

Link to comment
Share on other sites

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...