k08045kk / CopyTabTitleUrl

MIT License
88 stars 10 forks source link

Possible to copy/paste URL with embedded hyperlink? #49

Closed carloscadux closed 2 years ago

carloscadux commented 2 years ago

Hi,

I'd appreciate your help:

(1) By using CopyTabTitleUrl command 'URL', a plain text link appears in my clipboard, and when pasted in Word the URL is shown as like illustrated in the screenshot below.

(2) However, if copy the URL directly from the browser address bar, and paste it into Word, the link appears with the page title having the URL as an embedded hyperlink?

Is it possible to set CopyTabTitleUrl to copy/paste URL with embedded hyperlink, like described in (2)?

Thank you!

image

k08045kk commented 2 years ago

I interpreted the question as "I want to copy in text/html format, not text/plain, is that possible with CopyTabTitleUrl?". It is possible. Try the following configuration.

[v] Other > Extended mode
[v] Other > Copy in HTML format

Format > format1 : <a href="${url}">${title}</a>

That's all.

carloscadux commented 2 years ago

Indeed, your interpretation was my point! After setting the extension up with your suggestions it is working for copying in text/html format.

However there is an issue that started appearing after checking: [v] Other > Copy in HTML format

As shown in this screen-recording (https://bit.ly/3pvRFGY), this options seems to overwrite the behavior of "Separate multiple tabs with a newline character". I mean, now when I copy multiple tabs using any of the available formats, there is no line break separating multiple tabs anymore, which are pasted in a row.

=> Could you please provide further guidance to set the extension up to have "separate multiple tabs with a newline character" working again along with 'copy in HTML format'?

PS. I just left a review in chrome web store, also mentioning that your extension works with the mobile browser Kiwi (for Android). This mobile possibility is very handy!

Thank you!

k08045kk commented 2 years ago

If you need line breaks, add <br>.

<a href="${url}">${title}</a><br>
carloscadux commented 2 years ago

Thanks! The <br> did the job!

However, although with 'Copy in HTML format' ON my custom format <a href="${url}">${title}</a><br> works properly, every other default functionality on the main menu (screenshot below) don't work properly with multiple pages anymore. The pages are pasted in a row, ignoring "Separate multiple tabs with a newline character".

=> Would you suggest any setting to make the 'default functionality' to work with multiple pages again?

image

k08045kk commented 2 years ago

The pages are pasted in a row, ignoring "Separate multiple tabs with a newline character".

The newline character is inserted correctly; in HTML format it is not a newline character, but just <br>, etc., acting as a newline.

A "disable text/html copy function in the default function" modification may be necessary. However, this is a separate issue and will be addressed next. https://github.com/k08045kk/CopyTabTitleUrl/issues/50