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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -