hnakamur / FormatLink-Firefox

A Firefox web-extension to copy the URL and the title or the selected text to clipboard
https://addons.mozilla.org/ja/firefox/addon/format-link3/
MIT License
45 stars 8 forks source link

Update clipboard-helper.js #17

Closed p--q closed 2 years ago

p--q commented 7 years ago

In some HTML editor (ex. Blogger.com), when copying with text/html, paste it as the valid anchor tag.In both Create Link and Make Link, it was copied in text/html. Would you please change text/plain to text/html in Format Link?

p--q commented 7 years ago

Sorry. Copying became unstable when I set it to text/html.

asamuzaK commented 6 years ago

Some feed backs.

Hard coding with text/html will cause problems with formats other than HTML. It will cause problem even when user want HTML format output as plain text too.

The following is an implementation in my url2clipboard add-on.

On option (setting) page, prepare the option for output method when copying with HTML format.

Save the user's settings in the storage.

When the user selects the HTML format, read from storage and set it to the mime type of clipboardData.setData(). In other formats, set mime type to text/plain.

Cheers!

p--q commented 6 years ago

Thank you very much. I will use it.