How do I prevent the automatic email/mailto linking in a Text element?

I want to disable the automatic email/mailto functionality for the Text element that is described here:
https://support.wix.com/en/article/creating-a-clickable-email-address

I.e. I do not want the mail client launched when a Text element with an email address is clicked. I tried hooking up the onClick event in the page code and then have it do nothing, but the email client is still invoked.

Maybe be others will have better ideas, but i can think of 3 directions:

  1. Without code: add a character zero-width before the “@”. you can copy the charterer from here . Cons: if someone will copy and paste it, it might be sent to a different address and not to yours :).

  2. Without code: put a transparent shape over it. Cons: the user won’t be able to copy it by right click or crtl+c;

  3. with code: Use the html property to push the text, and add something in the middle so it won’t be recognized as an email. For example like:

$w("#text1").html = "<p class=\"p1\">address<span></span>@gmail.com</p>"

Cons: none;
Bottom line. You should go for the code.

  • without code, you can link the text to the current page, then it won’t link to the email, but yet, it’ll be a little bit weird. So code it is, I guess.
  • if you want to use a code but not the html property, you can ad a back-slash f before the @:
$w("#text1").text = "address\f@gmail.com"