How to Remove the Link Target Options from TinyMCE

The TinyMCE link dialog.

If you’re using the link plugin for TinyMCE to add links to content and want to get rid of the target attribute options then the trick is to set target_list to false in the editor’s configuration:-

tinymce.init({
    selector: "textarea",
    plugins: "link",
    menubar: "insert",
    toolbar: "link",
    target_list: false
});

Do not, I repeat, do not hack the plugin’s code as a number of people seem to be suggesting out there. That is never a good idea!

Related Content

Published on