Comments (8)
But before I worked fine, (that is, the regular expression for text pasting), I haven't used this feature for a long time. I don't know if the vscode has changed or you have changed, I hope you can fix it anyway.
from vscode-markdown-paste-image.
@htqx I use ubuntu 20.04, it work fine on my machine.
According to xclip's information, there is more than one clipboard, but multiple:
- primary
- secondary
- clipboard
- buffer-cut
vscode editor using 1. markdown paste using 3.
So, not working
Sorry, I don't know what your mean.
This extenstion use xclip to save clipboard image to file.
Please see:
https://unix.stackexchange.com/questions/145131/copy-image-from-clipboard-to-file
from vscode-markdown-paste-image.
But before I worked fine, (that is, the regular expression for text pasting), I haven't used this feature for a long time. I don't know if the vscode has changed or you have changed, I hope you can fix it anyway.
I notice that you have posted another comment at #6
1.57.1
paste pic ok。
but paste regex string no working。
arch linux
So, I think the xclip work fine, maybe there are something wrong in your MarkdownPaste.rules setting.
from vscode-markdown-paste-image.
test 1: pics/sss.jpg
paste: pics/sss.jpg
[Extension Host] getClipboardContentType TIMESTAMP
TARGETS
SAVE_TARGETS
MULTIPLE
STRING
TEXT
UTF8_STRING
text/html
text/plain
chromium/x-web-custom-data
console.ts:137 [Extension Host] platform linux
console.ts:137 [Extension Host] Clipboard Type: 0
console.ts:137 [Extension Host]
other editor copy.
test 2: pics/ss1.jpg
paste : https://gitee.com/deepinwiki/wiki/raw/master/pics/ss1.jpg
[Extension Host] getClipboardContentType UTF8_STRING
COMPOUND_TEXT
STRING
text/plain
TEXT
TARGETS
MULTIPLE
TIMESTAMP
Ole Private Data
Wine Marshalled DataObject
DataObject
console.ts:137 [Extension Host] platform linux
console.ts:137 [Extension Host] Clipboard Type: 1
hope this helps
from vscode-markdown-paste-image.
from vscode-markdown-paste-image.
@htqx
In test 1, the type of text you paste is text/html. Generally, the text you copy from a browser or some editor that can copy as html rich text will be marked with text/html. So the extenstion try to covert your pasting html text to markdown, but not apply regular expression conversion rules.
In Test 2, the pasted text type does not contain text/html, so the extenstion considers it to be normal text then applies regular expression conversion.
Maybe I update the extension to apply regular expression replacement to html rich text too, but I don't know whether it will bring any bad effects or not.
If you want to use the regular expression replacement function before update, you can paste these rich html text into an normal editor and re-copy it as plain text, the finally use the extension to paste it.
from vscode-markdown-paste-image.
The test1
I copied from the vscode editor. It used to be possible, I don’t know why this happened recently.
from vscode-markdown-paste-image.
@htqx
If you enable "Copy With Syntax Highlighting" option in vscode setting, you will get html text while copy. You can try to disable it.
from vscode-markdown-paste-image.
Related Issues (20)
- Default name to be YYYY-MM-DD_HH-mm-ss_<selected text> HOT 2
- Use in VSCode for the Web
- Add option for default alt text HOT 1
- Add ability to upload to `user-images.githubusercontent.com` similar to how GitHub does in READMEs and comments
- Mac OS Ventura: Command not found HOT 3
- Linux: Wayland support
- Paste cannot work HOT 3
- Not work in WSL mode, showing "Clipboard Type Unknown" HOT 3
- Add an option for set the name of the image HOT 1
- FYI, VS Code built in markdown extension is good enough HOT 1
- How to customize the way HTML is converted to Markdown? HOT 2
- Variable expansion in rules and Lang-rules HOT 2
- 多出来的 ** HOT 4
- The drive letter of Windows paste path should be in uppercase HOT 1
- Can't work in vscode-insider HOT 1
- Add SECURITY.md HOT 2
- Not working in Code on Debain or Ubuntu but works in Code on Windows 11 HOT 3
- Allow execution of extension in .Rmd files
- No support for image paste inside GitHub issues?
- Why there are spaces after the pasted image?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-markdown-paste-image.