1
votes

Redactor is a neat WYSIWYG JavaScript-based editor.

What is the proper way to add target="_blank" to all links created using the Redactor editor?

2

2 Answers

1
votes

Make sure the "Open link in new tab" is checked when inserting a link.

Redactor

1
votes

As of Redactor 1.2.5 it is now possible to simply set pasteLinkTarget in Redactor's settings when instantiating the editor:

https://imperavi.com/redactor/docs/settings/paste/#setting-pasteLinkTarget

This allows you to ensure that all links pasted or entered into the editor open in a new window.