简体   繁体   中英

Cursor position in html mailto link

When using the additional parameters in a mailto:// hyperlink, the cursor is placed at the start of the message. Is it possible to set the starting position of the cursor to another location in the body text?

For example, consider the following HTML:

<a href="mailto://example@example.com?subject=Hello&body=Hello,%0D%0A%0D%0A%0This%20is%20an%20additional%20line%20of%20text...">Click Here To Email Me</a>

Clicking on the link will launch the end-user's default email client and (if the client supports it) will pre-populate the to field with example@example.com , the subject field with Hello and the body field with:

Hello,

This is an additional line of text...

The default positioning of the cursor (ie in OS X Mail.app) is at the beginning of the body, before the word "Hello".

How can the cursor be positioned after the ellipses, so the end-user can finish the message? Is that even possible?

It is not possible.

When you click on any "mailto:" link, the browser will handle the request to any E-mail application, either a Desktop application like - Microsoft Outlook, Mozilla Thunderbird etc. or another browser tab like GMail.

In the "mailto:" link, we can set only the to, subject etc. But not any other information regarding the cursor position.

This is not possible. You don't have that level of control.

In fact, you can't even set the body and subject line for many e-mail clients.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM