Closed abelsromero closed 3 years ago
I can update the docs to make this clearer. FYI, here's how you add a subject and body:
mailto:info@domain.org[linked text,subject,body]
If you want the linked text to be the email address, just exclude it:
mailto:info@domain.org[,subject,body]
If you only want a subject, exclude the body:
mailto:info@domain.org[,subject]
linkattrs have never applied to the mailto macro.
The mailto prefix is required in order to have attributes (the text in brackets).
Could it go in a new subsection immediately after URLs? Email is not obviously related to URLs, mailto is not a uri-scheme, and mailto: is not affected by hide-uri-scheme as suggested by the current placement.
All this information is now covered on a page dedicated to the mailto macro. See https://docs.asciidoctor.org/asciidoc/latest/macros/mailto-macro/
I could not find a clear reference in the user manual about how to create a
mailto
link with parameters, for example the subject. However, some pieces of the user manual seem to indicate this is possible, even if in a confusing way (at least to me). I tried different things and settinglinkattrs
but could not find how to do it, at the end I usedmailto:info@domain.org[info,subject="sponsor%20plan"]
.The confusing part to me is in https://raw.githubusercontent.com/asciidoctor/asciidoctor.org/master/docs/_includes/url.adoc:
This mentions the option to set subject and body sections but the attributes summary table at the end of the section (https://asciidoctor.org/docs/user-manual/#summary) there's no mention of it. Also, the second line seems to be a leftover from when
linkattrs
was require (< 1.5.7).