Copy link to clipboard
Copied
Hello again,
I hope this is a fairly simple one: I'd like to add a clickable email link to the PluginManager and/or Export dialog. There's no method to create this that I've come across so far and I see that it appears to be possible via a workaround from this request:
Can anyone provide an example of how to inject HTML into a clickable text or button to achieve this?
Cheers!
Erik
Copy link to clipboard
Copied
Well, what I've done before is LrHttp.openUrlInBrowser( "mailto:asdf@qwerty.com..." ), which doesn't inject any html but generally opens an email link... (can be called in response to text click or button click..).
Let us know if you discover anything better.
R
Copy link to clipboard
Copied
Ah, I see. I had been trying to feed it the string of a fully-formed HTML doc (<HTML> ... </HTML>) and not just the mailto link.
I agree with you that it'd be nice if something like this were better supported by the API (or at the very least, documented a bit better) but this is simple enough for the time being.
Cheers!
erik
Copy link to clipboard
Copied
Hi Erik,
You can pass url parameters too, e.g.
local url = "mailto:asdf@qwerty.com?subject=Subject&body=Body"
LrHttp.openUrlInBrowser( url )
But unless you know how to force html format (I dont), the body will be interpreted as plain text.
Also, beware of url-encoding - I'm not sure whether pre-encoding is required or not.
Rob