euangoddard / clipboard2markdown Goto Github PK
View Code? Open in Web Editor NEWConvert rich-text on your clipbaord to markdown
Home Page: http://euangoddard.github.io/clipboard2markdown/
License: MIT License
Convert rich-text on your clipbaord to markdown
Home Page: http://euangoddard.github.io/clipboard2markdown/
License: MIT License
Thanks a ton for this!
On android, this doesn't seem to work, as there's no field to allow the long press menu to shown itself. (Specifically speaking android here.)
A small field that displays on it own (perhaps only visible on mobile, for clarity) might be a decent solution.
Thanks for any attention someone might feel inclined to offer to this. Open to pointers to the right place to look. :)
Hi! this is a great project. It would be great if we could have a Chrome extension that could directly copy the Markdown-conversion of the selected text on the webpage. I don't have much experience with web design, but do you think its an easy task?
pasted from evernote, images are converted to data-uri, I need an option to disable this behavior.
Sometimes, the text I copy is not being wrapped by '**' upon paste but it always work with headers and italicized texts. For example, try to copy-paste from the page in the zip file:
Cultivation Chat Group - Chapter 445 - Webnovel - Your Fictional Stories Hub_files.zip
Hi, I really appreciate this project. I've just had some trouble when using the output. When I put my text files through pandoc, I get a complaint about hard spaces which have been inserted. I think it's latex which is rejecting them. Let me know if you want more details. Some representations of the spaces are \20.
Hi! It doesn't work on the latest Firefox 82. When we paste into the website, the website becomes blank. Although it works fine on the latest Chrome.
Could you please have a look?
Hey @euangoddard
super long shoot here. I know well this might never happen. I still give it a try. I noticed all bold texts are dropped when I use https://euangoddard.github.io/clipboard2markdown/. Any chance this could be added?
Cheers,
Peter
Have you ever thought of wrapping turndown into a cross platform desktop native app?
You may have your clipboard monitored and the paste-to-markdown feature triggered by, for instance, a hotkey.
Maybe it would not be extremely expensive to wrap turndown using React Native.
This would be definitively great!, and by the way, it would also make happy those who, like me, wish a turndown browser extension existed.
thanks a lot again...
Close this issue as soon as you have read it @euangoddard @LuRsT @omgmog @epsil @FaithPatrick
Hi, it is not created proper table when copied rows from excel sheet or webpage
It is producing like this
| time | logstamp | org_src | ip_src |
| 5/23/18 15:21 | 01:35.1 | Spectrum Business | 69.75.79.138 |
| 5/23/18 15:06 | 48:14.1 | | |
i would expect in below format so that it will be rendered correctly
| time | logstamp | org_src | ip_src |
| -- | -- | -- | -- |
| 5/23/18 15:21 | 01:35.1 | Spectrum Business | 69.75.79.138 |
| 5/23/18 15:06 | 48:14.1 | | |
When content from Word is pasted, a lot of extra bonus-HTML is passed as well.
This can lead to words strung together: "like: thequick brownfoxjumps over the lazydog".
I fixed this (for a great deal) in a local project by simply stripping all unwanted things from the HTML.
function sanitizeHtml(html) {
// This destroys all (useless Word) <span> and <o:p> tags Word uses
// to set fonts on parts of the text and whatever
html = html.replace(/<span[^>]*>|<\/span>/g, '');
html = html.replace(/<o[^>]*>|<\/o[^>]*>/g, '');
// This cleans all wanted tags by replacing anything after "<tag" until and excluding ">"
// By eradicating the second part, all extra settings per HTML tag are removed
html = html.replace(/(<\w+)([^\>]*)/g, '$1');
// Clean up bold / italics mess that can lead to converson issues
// This covers only the basic cases
html = html.replace(/<\/b><b>/g, '');
html = html.replace(/<\/i><i>/g, '');
html = html.replace(/\s+<\/b>/g, '</b> ');
html = html.replace(/\s+<\/i>/g, '</i> ');
html = html.replace(/\s+<\/p>/g, '</p>');
return html;
}
Using it:
pastebin.addEventListener('paste', function() {
setTimeout(function() {
// Used here
var html = sanitizeHtml(pastebin.innerHTML);
output.value =convert(html);
output.focus();
output.select();
}, 200);
});
De solution is not tested for all cases.
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.