notlmn / copy-as-markdown Goto Github PK
View Code? Open in Web Editor NEW🖱 Browser extension to copy hyperlinks, images, and selected text as Markdown with GFM support
License: MIT License
🖱 Browser extension to copy hyperlinks, images, and selected text as Markdown with GFM support
License: MIT License
Context menu actions for this extension don't appear on pages by default. You have to click the extension in the menu to activate it:
This doesn't happen with other extensions Tranquilize or LeechBlock - they are always shown.
If this can't be fixed, it would be great to make it so clicking the extension doesn't open the GitHub.
See #30 or yorkxin/copy-as-markdown#109 for other discussion
For example, when copying this text from the README of this project:
Formatted text such as italic, bold, strike-through, and inline code.
... it should produce this markdown:
- Formatted text such as _italic_, **bold**, ~~strike-through~~, and `inline code`.
... but current produces this markdown:
- Formatted text such as _italic_, **bold**, ~strike-through~, and `inline code`.
When using https://euangoddard.github.io/clipboard2markdown/ with the same example, that page will produce "correct" markdown.
I know that there are different flavors of markdown. But I find it a bit strange that this extension and the mentioned website produce different markdown, since both projects seem to be based on https://github.com/mixmark-io/turndown
According to https://github.com/mixmark-io/turndown/blob/48f9bace01a14f7f2ed4cf6052e0a89ba190bb3a/dist/to-markdown.js#L207 , turndown should indeed produce the double-tilde variant for strike-through text.
Hi! friend! Your extension is great!
Hi! friend! Can you consider adding shortcut key functions to commands, so that you don't always have to open the right-click menu to select commands, so work efficiency will be greatly improved.
Thanks again for a great extension!
Chrome 120...
Windows 10
I mean if it is possible to upload it on Microsoft edge store.......
thanks
I am running Edge 126.0.2592.68 and this extension has worked well up until now. Today it was disabled as mentioned in another issue, but after re-enabling, it no longer puts anything in the paste buffer although it appears to work.
Additionally, on the web store, it mention privilege requirements:
Permissions:
The extension requires the following permission from you for working.
1. `contextMenus`: to show option when right-clicking.
2. `activeTab`: to be able to access content on page.
However, these privileges are not enabled in Edge
Please advise, and thanks for an extension that is so useful that I have come to rely upon it!
B.
Hello!
Online images cannot be copied and pasted into notes
Windows 10 19044
Chrome 120 | FireFox 120
If this problem can be solved, the extension will be very powerful and perfect.
Example image:
https://docs.github.com/assets/cb-82878/mw-1440/images/help/repository/headings-toc.webp
Thanks again for providing a very powerful browser extension! 👍😜
The Markdown code like this:
....
----
....
....
....
Copy As Markdown get this:
....
-
....
Thanks.
The "copy as markdown" feature is not working, though that would be the most useful feature for me ( "Copy image as markdown" and "Copy link as markdown" work). I am using
Browser: Firefox 73.0.1
OS: Fedora 31 or Windows
I tried it on:
When copying conversation from chat.openai.com ChatGPT / GPT4 , I believe multiple improvements could be made.
E.g. when copying conversation it could separate "User:" and "Assistant:" somewhow (e.g. with -----
?), and annotate whose which part is, e.g.:
-----
User:
Hello!
-----
Assistant:
Hello dear user, how can I help you?
-----
Very useful tool! Thanks a lot.
But it might be more convenient if can support setting a shortcut(chrome.commands) for triggering copy-as-markdown.
Chrome extension isn't' updated yet.
When copying just plain text, it does not appear to copy anything. So, if there's nothing special to convert to Markdown, it won't copy.
I haven't been able to reproduce this reliably, sorry. Just noting observations and a workaround.
Sometimes when I select text in a page, then right click to copy-as-markdown, the menu item "Copy selection as Markdown" is missing from Firefox's context menu.
I have made sure the extension is allowed in private windows (though this happens on non-private windows).
What I have found fixes this, is to disable and then re-enable the extension, then reload the web page.
After reload and selecting the same text, the menu item is available and the copy-as-markdown works as usual.
(thank you for this extension, I use it a lot!)
For example, the text <h1>1. Hello world</h1>
is copied to the Markdown output <h1>1. Hello world</h1>
, rather than the proper escaped version \<h1\>1. Hello world\</h1\>
. I've filed a bug to turndown, since it looks like they're responsible for the escaping: mixmark-io/turndown#395
Thank you for great plugin.
Could you please make support, allowing to use *
for bullet lists instead of -
?
*
is default in original Daring Fireball https://daringfireball.net/ Markdown specification.
Of course allowing to have option to select default, in browser extension options would be great too!
In this article, the
Can't access options
Hi all, I am using Copy as Markdown in Brave Browser. I cannot seem to get to the options menu as it doesn't display completely. Just the first line appears. How can I see and change the options (maybe directly in the files), to get a shortcut to copy as Markdown?
I want to save the copy image to my Azure blog storage
I'm not sure if this is the place for a feature request, but it would be great if this extension provided a way to copy the current page as a markdown link using the page title for the link name.
右键复制,在移动端不能实现,希望能支持。
感谢开发者!
Right-click copy, which cannot be implemented on the mobile side. I hope it can be supported.
Thanks to the developer!
浏览器举例:kiwi 、 http://static.lemurbrowser.com/assets/gitlab/Lemur_1_0_1_178.apk
Examples of browsers: kiwi 、 http://static.lemurbrowser.com/assets/gitlab/Lemur_1_0_1_178.apk
Download the crx file and drop it into the the Chrome tab chrome://extensions.
Problem : Chrome has desactivated my extension immediately !
It's only possible to use Chrome extension available or puiblished on Chrome Store !
Could you publish this extension on Chrome Store ?
So far I haven't found any better copy as markdown extension, but still, it has the following issue.
By right click on the following link
<a href="https://github.com/notlmn/copy-as-markdown">copy as markdown repository</a>
and selecting copy link as markdown option, it copies this:
[https://github.com/notlmn/copy-as-markdown](https://github.com/notlmn/copy-as-markdown)
whereas it should copy this:
[copy as markdown repository](https://github.com/notlmn/copy-as-markdown)
Turndown supports Strikethrough. When doing a Strikethrough, you should be able to use 2 tilde characters before and after.
~~sample~~
renders as
sample
This does not appear to be supported using the copy as markdown feature. I had the following HTML that I had copied that didn't convert:
<strike>sample</strike>
This is the best plugin of its kind, thanks a lot for making it available and maintaining it. It really saves me a lot of time, and mostly MD is the format I need in my daily work. Only rarely, I need links in HTML, e.g. in emails and sometimes in forums or ticketing systems.
That's why I wonder if it were possible to add an option (with limited features) to copy links (and maybe images) in HTML format? All the other features (styling support, etc.) are not required, though. Just plain links, and since this plugin has all the infrastructure in place, this extra feature might be a reasonable enhancement, rather than installing yet another plugin for HTML links.
I tried setting multiple shortcuts to see if it works.
I couldn't. Not sure what the problem is.
Thanks for creating this plugin, looks very promising.
I wonder if you could add an option / menu item / setting to copy markdown selection without links. For example instead of
### [](https://github.com/notlmn/copy-as-markdown#known-issues)Known Issues
I'd like to have just
### Known Issues
Sometimes links get in a way and reduce readability.
Thank you very much for this awesome extension!
On mobile, there is there are some browsers such as Kiwi which support installing any Chrome extension. The issue is that it does not populate the contextual menu as it does on desktop, hence the only way to interact with extensions on mobile is by clicking on the extension's toolbar icon.
Currently, copy-as-markdown directly redirects to this github repo on click, but a simple solution would be to add a simple menu on icon click that simply displays the same options as the right-click contextual menu + a link to this github.
Copying Markdown from a web page and pasting it into a note causes extra characters to appear.
Chrome 120 | FireFox 120
Windows 10 19044
Extension latest version
The sample web page content is as follows:
<html><body>
<!--StartFragment--><strong>型号:</strong>
<span class="value"><a href="https://www.zol.com.cn/BMO_codes/BMO">BMO</a>-593</span>
<div class="panel-block">
<strong>上市日期:</strong>
<span class="value">2022-10-25</span>
</div>
<div class="panel-block">
<strong>长度:</strong>
<span class="value">125 公分</span>
</div><!--EndFragment-->
</body>
</html>
Steps to reproduce:
Hello! Is there any way to prevent this extra character from appearing after pasting it into a note?
When copying conversation from chat.openai.com ChatGPT / GPT4 , I believe multiple improvements could be made ( e.g. #33 ),
but one that I believe also would help on many other sides with codeblocks that are easy to copy and paste:
Current behaviour:
> after copy&paste of codeblock
>
> `multi
> line
> code
> is surrounded by single backticks`
> unfortunately
Expected behaviour:
> after copy-as-markdown
>
> ```
> multi line
> line code/text
> is surrounded by
> triple backticks
> ```
P.S. I used >
indentation because otherwise I don't know how to put triple backticks inside triple backticks in Markdown
The Chrome extension supports setting a shortcut to activate the extension but I can't find a way to set a keyboard shortcut for "copy link as markdown".
Is it possible to add that ability to the extension?
I just got a message that I must grant this permission, aka nativeMessaging, for the new version. There's no explanation of why it's necessary. It seems to have replaced the clipboardWrite permission, but I can't find any information about why that might be.
From review: https://addons.mozilla.org/en-US/firefox/addon/cpy-as-md/reviews/1514624/
Relative links are rarely useful and the user has to convert them to absolute links anyway. (Except when copying as Markdown from GitHub rendered MD, but GH converts all relative links to absolute anyway).
Sample link: https://www.macports.org/install.php#help (last 2 paragraphs)
When nothing is selected copy the [Title](Url)
of the webpage to clipboard.
For example: [The Wonderful Story of Henry Sugar Official Trailer Netflix - YouTube](https://www.youtube.com/watch?v=4RdncisZ_QA)
copy something like:
<ul>
<li>something</li>
<li>something</li>
<li>...</li>
</ul>
- something
- something
- ...
- something
- something
- ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.