Autolink plugin
The Autolink plugin automatically creates hyperlinks when a user types a valid, complete URL. For example www.example.com
is converted to http://www.example.com
.
Note that this option won’t convert incomplete URLs. For example example.com
would remain as unlinked text and URLs must include www
to be automatically converted.
Pasted URLs are automatically converted to a elements by TinyMCE’s core code, not by the autolink plugin. Therefore, behaviour and settings described here do not apply to pasted links.
|
Basic setup
tinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'autolink'
});
Options
link_default_target
This option allows you to set a default target
value for links when inserting/editing a link via the link dialog. If the value of link_default_target
matches a value specified by the link_target_list
option, that item will be set as the default item for the targets dropdown in the link dialog.
This option also applies to the link plugin. |
Type: String
link_default_protocol
This option allows you to set a default protocol for links when inserting/editing a link via the link dialog. The protocol will apply to any links where the protocol has not been specified and the prefix prompt has been accepted.
This option also applies to the link plugin. |
Type: String
Default value: 'https'