Giter VIP home page Giter VIP logo

Comments (8)

htqx avatar htqx commented on August 23, 2024

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.

telesoho avatar telesoho commented on August 23, 2024

@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:

  1. primary
  2. secondary
  3. clipboard
  4. 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.

telesoho avatar telesoho commented on August 23, 2024

@htqx

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.

htqx avatar htqx commented on August 23, 2024

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]

pics/sss.jpg


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.

htqx avatar htqx commented on August 23, 2024

sorry, this is pic:
image
image

from vscode-markdown-paste-image.

telesoho avatar telesoho commented on August 23, 2024

@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.

htqx avatar htqx commented on August 23, 2024

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.

telesoho avatar telesoho commented on August 23, 2024

@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.

image

from vscode-markdown-paste-image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.