Commit Graph

254 Commits

Author SHA1 Message Date
Meghan Kulkarni
ed59945156 Links with no authority are considered invalid (#189323)
* edit validateLink
2023-07-31 19:36:21 +01:00
Meghan Kulkarni
f7d59ef171 Links are not automatically pasted as Markdown link if nothing is selected (#189338)
update automatic pasting
2023-07-31 11:30:03 -07:00
Meghan Kulkarni
070707dffc Smart pasting results in a new widget label (#189098)
* add and localize smart label
2023-07-27 22:30:46 +01:00
Meghan Kulkarni
b5a46136c4 Markdown link pasting does not encode or decode links (#188992)
* uris pasted with no encoding or decoding

* add tests for checking encoding
2023-07-27 20:13:03 +01:00
Meghan Kulkarni
df16c16211 Smart markdown pasting does not occur in tilde code block (#189004)
smart paste checks ~~~ code block
2023-07-27 09:09:38 -07:00
Meghan Kulkarni
87afa166d0 markdown link smart pasting (#188437)
* making markdown link pasting feature smarter

* update validateLink
2023-07-24 16:25:19 -07:00
Meghan Kulkarni
2ba9f17b3f making the markdown link paste feature smart (#188119)
* making markdown link pasting feature smarter

* Update settings description

Co-authored-by: Joyce Er <joyceerhl@gmail.com>

* made checkPaste more concise

* won't paste md link in fenced code or math

* updated the smart md link pasting

* link validation and naming changes

* resolving comments and tests

* resolving comments & writing tests

---------

Co-authored-by: Joyce Er <joyceerhl@gmail.com>
2023-07-20 15:16:40 -07:00
Meghan Kulkarni
f07abd224b Make markdown link pasting feature smarter (#187170)
* making markdown link pasting feature smarter

* Update settings description

Co-authored-by: Joyce Er <joyceerhl@gmail.com>

* made checkPaste more concise

* won't paste md link in fenced code or math

---------

Co-authored-by: Joyce Er <joyceerhl@gmail.com>
2023-07-10 14:11:49 -07:00
Meghan Kulkarni
82e9a14903 Fix: do not encode external links (#186778)
* bug fixes

* added label to copyPaste.ts

* added localized label to copyPasteLinks file

* quick fix for pasting highlight bug

* concise if-statement

* external urls are not automatically encoded
2023-06-30 13:19:03 -07:00
Meghan Kulkarni
715334ba8c small changes (#186574)
* bug fixes

* added label to copyPaste.ts

* added localized label to copyPasteLinks file
2023-06-29 02:14:23 +02:00
Meghan Kulkarni
6626f5f07a turning highlighted Markdown text to link to pasted URL (#185924)
* turning highlighted Mardown text to link to pasted URL

* resolved comments

* resolved more comments

* preserved behavior of existing file pasting logic

---------

Co-authored-by: Meghan Kulkarni <t-mekulkarni@microsoft.com>
2023-06-26 17:25:52 -07:00
Matt Bierner
5ee455116f Add codeql comments and small fix (#185931) 2023-06-23 02:40:39 +02:00
Matt Bierner
a9fe660ce6 Enable dropping image/* data into markdown to insert images (#184112)
Enable dropping image/* data into editor

This enable drop to create images on web
2023-06-01 21:37:48 -07:00
Matt Bierner
0e0b629ef5 Respect copy files correctly when in .dot files (#184109)
Fixes #183998
2023-06-01 21:33:48 -07:00
Matt Bierner
fa8eefda18 Use <...> style markdown links when needed (#183876)
Fixes #183849
2023-05-31 09:58:23 +10:00
Matt Bierner
d933dbdc34 Default to filename for markdown new file if empty (#183864)
Fixes #183848
2023-05-30 22:09:43 +02:00
Matt Bierner
50527c97d8 Use desired file name when generating new md pasted file paths (#183861)
Fixes #183851
2023-05-30 21:54:18 +02:00
Matt Bierner
3c161fd2b1 Add better label when adding video/video to md (#183379) 2023-05-25 01:30:06 +02:00
Anuj Parajuli
6675ef9017 Adds #181652 html audio tag for audio file (#183328) 2023-05-24 21:28:52 +00:00
Matt Bierner
7a7d45793b Allow external copying files into the workspace on markdown drop / paste (#182572)
Allow copying files in the workspace on markdown drop / paste

Fixes #157043

Also:

- Renames the markdown paste settings and makes them no longer experimental
- Makes the copyFiles setting no longer experimental
- Adds a `markdown.copyFiles.overwriteBehavior` which lets you control if/how existing files are overwritten
2023-05-15 20:17:52 -07:00
Matt Bierner
4d38422afe Add priority to paste / drop apis (#182109)
* Add priority to paste / drop apis

Fixes #181886

Replacement for #181453

* Make notebooks prefer text over creating attachments
2023-05-10 14:18:05 -07:00
Matt Bierner
ca51a4b04c Add paste as command (#181959)
For #30066

This command shows a quick pick that lets you select how to paste content
2023-05-10 06:17:42 -07:00
Matt Bierner
83c12a2da2 Allow creating multiple files or attachments on paste (#181975) 2023-05-09 17:20:37 -07:00
Matt Bierner
ab0a574bb9 Don't enable paste to create files in untitled files (#181929) 2023-05-09 20:45:19 +02:00
Michael Lively
2a6b42a71c enable paste widget for notebook cells 2023-05-03 09:51:29 -07:00
Matt Bierner
11ca8d75a1 Add widget to change how content is pasted (#181290)
* Add widget to change how content is pasted

For #30066

This adds a widget that lets you change how content is pasted if there are multiple ways it could be pasted

To do this, I've made the post drop widget generic and reused it for pasting too

* Update types

* More code deduplication
2023-05-02 09:40:04 +02:00
Matt Bierner
3273501a5a Address drop UX feedback (#180343)
- Reduce margin on button
- Change icon to insert
- Try to align styling to match other editor widgets
- Use capital casing on entries
2023-04-19 19:05:56 +02:00
Matt Bierner
f6de066b4c Improve labels when dropping resources into markdown files (#180260) 2023-04-18 15:11:38 -07:00
Matt Bierner
739b93cce8 Update drop metadata proposal (#179918)
- Makes `dropMimeTypes` required
- Prefix the actual `id` used internally with the extension id
- Allow wildcard mime types, such as `image/*`
2023-04-14 07:59:38 +10:00
Matt Bierner
830d534e27 Allow passing in a DataTransferFile to workspace edit (#175809)
* Allow passing in a `DataTransferItem` to workspace edit

Fixes #175800

Allows you to pass a file `DataTransferItem` to `WorkspaceEdit.createFile`. This lets us avoid transferring the data back and forth to the extension host, and also avoid having to base64 encode and decode it, significantly improving performance for large files

* Take data transfer file instead of data transfer item
2023-04-13 14:08:08 -07:00
Matt Bierner
e9262678fa Add drop feedback UX (#179434)
For #179430

Adds two new UX components:

- An inline progress icon shown when a drop operation takes over 500ms. This replaces the notification. You can click on it to cancel the drop

- Post drop, a drop feedback icon that lets you drop the file in a different way. This lets you drop the file as plain text for instance instead of as a markdown link
2023-04-11 13:48:24 -07:00
Joyce Er
812f3f5fc4 Insert <video> tag for shift+mp4 into .md (#179489)
* Insert `<video>` tag for `shift`+mp4 into .md

* Simpler drop text
2023-04-10 15:30:34 -07:00
Matt Bierner
7570fadcce Split uri-lists on \r\n for markdown drop (#175552)
Fixes #175547
2023-02-27 17:55:04 +01:00
Matt Bierner
fc763d98df Re-apply markdown copy files setting (#169661)
* Revert "Revert "Add experimental setting to define where files should be copied for markdown (#169454)" (#169615)"

This reverts commit b2121c2dbe.

* Fix tests

These paths should always use `/`
2022-12-20 11:04:51 -08:00
Christof Marti
b2121c2dbe Revert "Add experimental setting to define where files should be copied for markdown (#169454)" (#169615)
This reverts commit 1d6b47a005.
2022-12-20 10:03:12 +01:00
Matt Bierner
1d6b47a005 Revert 1d0a9f9e63 (#169578)
Resubmits the original PR with test fixes for windows
2022-12-19 14:25:37 -08:00
Benjamin Pasero
1d0a9f9e63 Revert "Add experimental setting to define where files should be copied for markdown" (#169492)
Revert "Add experimental setting to define where files should be copied for markdown (#169454)"

This reverts commit 09c0b1f799.
2022-12-18 14:11:45 -08:00
Matt Bierner
09c0b1f799 Add experimental setting to define where files should be copied for markdown (#169454)
For #157043
2022-12-16 16:23:59 -08:00
Matt Bierner
9b3371e6e3 Fix path sep for markdown drop on windows (#167862)
Fixes #167824
2022-12-01 19:27:21 +01:00
Matt Bierner
a62879bb46 Try computing windows paths correctly on markdown drop (#166077)
Fixes #165352
2022-11-13 15:03:05 -08:00
Matt Bierner
cd29f751eb Adopt l10n for markdown extension (#165448)
For #164438

Also makes our eslint rules understand `vscode.l10n.t(`
2022-11-04 09:49:49 +01:00
Matt Bierner
33867c55f3 Adopt prefix private with _ in markdown extension (#165088) 2022-10-31 14:22:39 -07:00
Matt Bierner
0570a7678d Use posix path for markdown links (#164822)
Fixes #164782
2022-10-27 19:21:03 +02:00
Matt Bierner
1316bf789f Rework markdown update link glob (#164766)
* Rework markdown update link glob

Fixes #164587

This changes the `externalFileGlobs` setting to instead be a include array of globs that should trigger link updates. I've split the globs into markdown files and image/video files

This also makes it easier for users to add their own new globs to the list

* Fix scopes
2022-10-27 01:45:45 +02:00
Matt Bierner
7060fb81dd Shorten markdown link button titles (#164764)
Fixes #164556
2022-10-27 00:39:30 +02:00
Matt Bierner
882cdc0a17 Use newlines to separate inserted images (#164632)
Fixes #164610
2022-10-25 12:21:36 -07:00
Matt Bierner
641046a11d Add commands to insert images/links in markdown (#163706)
* Add commands to insert images/links in markdown

Fixes #162809

* Rename commands and allow passing in uris

* Support selecting many images/files
2022-10-14 16:05:36 -07:00
Matt Bierner
186d3415a3 Use ??= in more places (#163594) 2022-10-13 14:59:35 -07:00
Matt Bierner
e1a373defd Finalize markdown link updating on file move (#163378)
Fixes #148146
2022-10-11 17:42:10 -07:00
Matt Bierner
3ee9749b35 Remove extra enums (#162686)
`showMessage` returns the selected item, so we don't need to create an enum here and can instead used the returned items directly
2022-10-04 10:46:53 -07:00