jira-shortcut icon indicating copy to clipboard operation
jira-shortcut copied to clipboard

Copied link includes custom style

Open erwa opened this issue 6 years ago • 4 comments

Hi Max,

Thank you for this useful plugin. Just one suggestion for an improvement: I use the "Email" config, which creates a hyperlinked text snippet. However, the snippet includes some style CSS, which causes it to look different from the rest of my email message. The raw snippet that gets copied to my clipboard looks like:

<meta charset='utf-8'><a href="https://issues.apache.org/jira/browse/HIVE-15353" style="font-family: system-ui, &quot;PingFang TC&quot;, &quot;Heiti TC&quot;, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;">HIVE-15353: Metastore throws NPE if StorageDescriptor.cols is null</a>

Is it possible to not include the style CSS in what's copied to the clipboard?

erwa avatar Apr 26 '18 07:04 erwa

Hey @erwa. Sorry for the late reply. I will look into it.

mshytikov avatar Jun 12 '18 09:06 mshytikov

Thank you very much!

erwa avatar Jun 13 '18 00:06 erwa

Hey @erwa ,

I have checked different options, and unfortunately have not found any solution. The problem is quite deep and lies in browser implementation. I have found update which was released recently https://developers.google.com/web/updates/2018/03/clipboardapi But unfortunately Chrome currently only supports writeText and does not support write which I need for copying HTML snippet. For now I will live the ticket open. Let's wait a bit for Chrome to fully support clipboard API. Only then I can fix the issue.

Thank you for using extension and reporting the issue.

mshytikov avatar Jun 13 '18 20:06 mshytikov

Thanks for investigating, Max.

erwa avatar Jun 14 '18 00:06 erwa