Add copy as markdown option
Hi, could you ad an option to copy selected text with a markdown formatting? There's an extension that does something similar, so you perhaps could reuse some parts of its code: https://github.com/chitsaou/copy-as-markdown
Best regards, Sebastian
I have found an extension that does precisely that, but it would be nice to have this feature integrated into ContextSearch: https://github.com/0x6b/copy-selection-as-markdown
Regards
Sure I'll get something set up. I'm working on a big update so I won't get to it right away.
I have some time to look into this now. What specific things are you wanting to copy as markdown? Links & images?
OK, so basically I would like to have an option in the context menu to copy selection as markdown - exactly the same functionality as offered by the extension I mentioned: https://github.com/0x6b/copy-selection-as-markdown
There are examples shown of what it does.
I have also recorded what is the effect when I copy a selected text using your extension, Firefox's copy function and using the 'Copy as a Markdown' extension: https://sendvid.com/qheo3ldg
By the way as you can see, copying text through your extension copies only the text without the formatting - I think it should copy the text with the formatting, just as the Firefox's copy function does.
By the way as you can see, copying text through your extension copies only the text without the formatting - I think it should copy the text with the formatting, just as the Firefox's copy function does.
I used the hacky way copy text to avoid adding another permission.
I'll need to think a bit on how to integrate with quick and context menus, but I'll have something for the next big release.
I'll need to think a bit on how to integrate with quick and context menus, but I'll have something for the next big release.
What you mean is that you will integrate 'Copy as markdown' option or FF's copy function?
What you mean is that you will integrate 'Copy as markdown' option or FF's copy function?
Markup. I'll toy around with some ideas and post again here when I have something in the repo worth testing.
Checking out the add-on now... seems pretty solid.
If it's working for you, why not continue using it? What benefit would there be to having the functionality integrated into ContextSearch over what you have now?
Yeah, the add-on works very well for me.
The reasons are two-fold:
- having one less extension installed
- higher productivity and convenience, that is why I use your extension to copy or search stuff in DDG/Amazon/Youtube
I'm still looking into this, but it just seems like a function best suited for a separate addon, what with all the additional options for formatting. I did however come across some some simple bookmarklets that will copy links and page urls to markdown, which should integrate with ContextSearch and be available to all menus. If you need something more robust, you're probably better off with a dedicated add-on.
For example:
https://gist.github.com/bradleybossard/3667ad5259045f839adc
https://github.com/benbalter/copy-issue-link-bookmarklet
Great, thanks for the update and your work!