Add a rel=”nofollow” checkbox to WordPress link modal

With a little bit of JavaScript, you can add a rel="nofollow"¬†checkbox to WordPress’ link editor, right below “Open link in a new tab”.

Customizing the WordPress link modal requires using JavaScript to first modify the form’s HTML, then overriding functions on the wpLink¬†object to perform additional behavior.