The WYSIWYG Editor includes a tool to help insert an email-type link on a page. This produces a mailto: prefix rather than an http:// prefix within the value of the href attribute, indicating a different protocol and initiating an instance of an email client on the user's local computer in order to send email.
Creating an Email Link
To include a link on a page that user can click to send email, do the following:
- Select the text on the page or image to make the link.
- Click the email icon on the toolbar.
On the modal displayed, configure the following as necessary:
- Recipient Email: Required. Provide an email address. For example, firstname.lastname@example.org.
- Mail Subject: Optional, but useful to automatically add a subject for the email. This can be used by the recipient to automatically filter incoming email from the web site.
- Element ID: Optional. Adds the id attribute with the specified value to the <a> tag. When adding via the dialog, it is not necessary to add the attribute itself nor the quote marks. For example, enter: support-email and id="support-email" is added to the mark-up. An id might be used to create a bookmark on a page or by web developers to target specific nodes.
- Inline Style: CSS can be defined here and is then added as inline syntax of CSS. For example, enter: color: red; font-weight: bold; border: 1px solid; and the text selected for the mailto link is formatted as bold, red text with a one pixel border.
- Class: Optional, if a class has been defined, it can be selected here.
- Click Insert.
- Save and publish the page to make it live on the production server for the site.
In the mark-up, the text appears similar to:
<a href="mailto:email@example.com">Email Support</a>.