tinymce - how to prevent automatically adding mailto attribute -


when write email address (test@test.com) tinymce automatically adds mailto link :

<a href="mailto:test@test.com">test@test.com</ a> 

is there way remove feature , keep site addresses - example - www.test.com.

what seeing due autolink plugin. can set regex plugin should use matching links using autolink_pattern setting.

the default value setting (as of tinymce 4.6.5) is:

var autolinkpattern =  /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[a-z0-9._%+\-]+@)(.+)$/i; 

(you can see in source code autolink plugin).

try putting in configuration:

tinymce.init({   selector: '#mytextarea'   ...   ...   autolink_pattern: /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)(.+)$/i, }); 

in testing still converts urls not convert email addresses.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -