You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vscode support pasting images into markdown using ctrl-c and ctrl-v.
The paste action can be explicitly invoked using Paste As command when your clipboard contains raw image data
But currently I can'd do the same to typ files. A simple workaround is to switch vscode to markdown mode when opening typ files.
Description
When clipboard contains raw image data, ctrl-v (or other paste hotkeys) should create image.png in workspace root, and insert #image("image.png"). (similar to markdown.link.image)
A real examples using this feature would be right-click an image in browser and ctrl-v into vscode typ file.
However, to make this feature actually useful, typst also need to support renaming files referenced by typ using "rename symbol" action (e.g. on Windows it is F2 key). This is also shown in the video above.
I think it might be a bit complicated to implement because image file type detection is also needed.
This an internal feature of the vscode so we cannot do it in typst as well. The related customization handler currently only available in vscode insider.
This seems like a useful feature for the other editor integrations, but like @Myriad-Dreamin said it would come down to internal editor work. I will try to get this behavior working in vim but it might not be initially core to tinymist.
Motivation
vscode support pasting images into markdown using
ctrl-c
andctrl-v
.The paste action can be explicitly invoked using
Paste As
command when your clipboard contains raw image dataBut currently I can'd do the same to
typ
files. A simple workaround is to switch vscode to markdown mode when openingtyp
files.Description
When clipboard contains raw image data,
ctrl-v
(or other paste hotkeys) should createimage.png
in workspace root, and insert#image("image.png")
. (similar tomarkdown.link.image
)Example: https://files.catbox.moe/p5au03.mp4
Examples/Questions
A real examples using this feature would be right-click an image in browser and
ctrl-v
into vscodetyp
file.However, to make this feature actually useful, typst also need to support renaming files referenced by
typ
using "rename symbol" action (e.g. on Windows it isF2
key). This is also shown in the video above.I think it might be a bit complicated to implement because image file type detection is also needed.
I believe this feature in vscode markdown is added by https://code.visualstudio.com/updates/v1_79#_copy-external-media-files-into-workspace-on-drop-or-paste-for-markdown , and it have another example showing that it is also possible to drag and drop image into markdown directly, but I think this need to be another feature request so I am not requesting this in this issue.
The text was updated successfully, but these errors were encountered: