The Link extension adds support for `<a>` tags to the editor. The extension is headless too, there is no actual UI to add, modify or delete links. The usage example below uses the native JavaScript prompt to show you how that could work.
By default, [linkify](https://linkify.js.org/docs/) adds `//` to the end of a protocol however this behavior can be changed by passing `optionalSlashes` option
#### Removing and overriding existing html attributes
You can add `rel: null` to HTMLAttributes to remove the default `rel="noopener noreferrer nofollow"`. You can also override the default by using `rel: "your-value"`.
This can also be used to change the `target` from the default value of `_blank`.
```js
Link.configure({
HTMLAttributes: {
// Change rel to different value
// Allow search engines to follow links(remove nofollow)
rel: 'noopener noreferrer',
// Remove target entirely so links open in current tab
A function that validates every autolinked link. If it exists, it will be called with the link href as argument. If it returns `false`, the link will be removed.
Can be used to set rules for example excluding or including certain domains, tlds, etc.
Did you know that you can use [`getAttributes`](/api/editor#get-attributes) to find out which attributes, for example which href, is currently set? Don’t confuse it with a [command](/api/commands) (which changes the state), it’s just a method. Here is how that could look like: