Skip to content
JavaScript

How to Remove the Link Target Options from TinyMCE

1 min read
Screenshot of TinyMCE's Insert Link modal

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!

© 2024 Andy Carter