Cursor position in html mailto link
Asked Answered
N

2

9

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://[email protected]?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 [email protected], the subject field with Hello and the body field with:

Hello,

This is an additional line of text...

The default positioning of the cursor (i.e. 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?

Northing answered 10/10, 2013 at 0:31 Comment(1)
Nominating to re-open. It's very clear what this person is asking.Annexation
L
9

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.

Luciana answered 10/10, 2013 at 0:40 Comment(0)
A
0

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.

Annexation answered 10/10, 2013 at 0:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.