Commit Graph

144 Commits

Author SHA1 Message Date
Matt Bierner
6053021a6c Split up and rename Markdown Scroll Sync Settings (#19077)
Splits the markdown scroll sync settings to be more granular.
2017-01-23 11:59:12 -08:00
Matt Bierner
0451361010 Fixes #19070 2017-01-23 11:55:35 -08:00
Matt Bierner
bc27d5c88e Restore double click to switch to editor behavior 2017-01-22 01:04:18 -08:00
Matt Bierner
5bf8cc7618 Add Markdown Preview to Editor Scroll Syncronization
Adds an initial implementation of scroll synrconization from the markdown preview to the editor. When the preview is scrolled, automatically scrolls the editor to reveal the same location.

This required adding a new supported reveal type `AtTop` in our API. This is already supported and used internally, but not really exposed in the public apis (except for the `revealLine` command).
2017-01-22 00:47:06 -08:00
Matt Bierner
dc614f212d Cleanup markdown extension (#18951)
* Splits symbol provider to own file
* Removes duplicate frontmatter logic
2017-01-20 15:20:37 -08:00
Matt Bierner
94909e76d0 Fixes #18946 (#18948) 2017-01-20 13:22:41 -08:00
Matt Bierner
d85dc993f9 Support Local File Links from the Markdown Preview (#18824)
* Support Local File Links from the Markdown Preview

Fixes #989

**Bug**

* `file://` links do not work in the markdown preview.
* `./file` and `/file` and `file` links do not work in the markdown preview.

**Fix**
For the first issue, allow `file://` links explicitly.

Add a custom link validator. If the incoming link has no scheme, try to resolve it relative to the current file or workspace. Likes like `/file` are relative to the workspace, while links like `file` or `./file` are relative to the current file.

* Fix reveal of source line on load in markdown preview
2017-01-20 12:44:09 -08:00
Matt Bierner
b5ae881b26 Add Markdown Document Link Provider To Support Local Links (#18821)
* Support []() links

* Fix for file switching

* Fix local links with hash fragments
2017-01-20 11:36:34 -08:00
Joao Moreno
ebba80143b Merge branch 'markdown-outline' of https://github.com/joaomoreno/vscode into joaomoreno-markdown-outline 2017-01-20 11:45:55 +01:00
Matt Bierner
cc4833d868 Improve preview to editor mapping (#18816) 2017-01-19 16:11:34 -08:00
Matt Bierner
b29ef9b4e8 Prototyping Markdown Preview Synchronization With Editors (#18762)
* Adds command to post a message to an html preview

**Bug**
There is currently no easy way to communicate with an html preview document after the preview has been created.

**Fix**
Adds a command called `vscode.htmlPreview.postMessage` to post a message to a visible html preview. This message will only be posted if the target preview is visible.

Inside the preview, the event is recieved using the standard dom event:

* Remove logging

* proto

Continue proto

* clean up rendering

* Gate prototype

* Fix gating

* Remove public command

* Change setting name

* Added current position indicator

* Reveal center
2017-01-18 17:58:45 -08:00
Matt Bierner
5dc2fb8c30 Maintain Markdown Preview Scroll Position on Window Resize (#18760)
* proto

Continue proto

* Basic implementation
2017-01-18 15:42:32 -08:00
Matt Bierner
9721d92af8 Fixed named headers for markdown preview (#18759) 2017-01-18 14:17:26 -08:00
Matt Bierner
c932846c67 Wrapping in Markdown Preview (#17361)
* Improve markdown Wrapping

Includes a few improvements to the markdown preview

* Use breakword by default to break up very long words
* When `editor.worWrap` is enabled, wrap code blocks inside of the html preview.
* Reverts 41467b74b7 . This change is adding an 20px margin to the left of any html content. I believe the html content itself should be responsible for adding this padding and should normally fill the entire screen.
* Better centers markdown preview content

* Move padding to default webview style

* Remove padding change for now
2017-01-12 16:29:27 -08:00
Matt Bierner
7baf789eef Generate Line Number in Markdown Output HTML
Adds basic line number data to the output html of the markdown renderer
2017-01-09 15:04:47 -08:00
Joao Moreno
d421cf5ef9 fix regex to catch pound signs at the end 2016-12-13 09:20:40 +01:00
Joao Moreno
19578fbf23 delay markdown require 2016-12-13 09:11:00 +01:00
Joao Moreno
213546688a remove console.log 2016-12-09 14:35:16 +01:00
Joao Moreno
95a674c09e outline support for markdown 2016-12-09 14:32:22 +01:00
Matt Bierner
0fe7046f49 Enable Strict Null Checks and Use Lib References in Markdown Extension (#16346)
Makes a few changes to the markdown extension:

* Enables explicit null checks.
* Enables no implicit any checks.
* Switch to using TS 2.0 lib files.

This change required removing the mocha declaration from the shared `declare.d.ts`. Everything seems to compile fine without it.
2016-12-02 11:07:40 -08:00
Matt Bierner
0c6333e604 Add font settings for markdown preview (#16302)
Fixes #4641

Adds basic settings for controlling the markdown preview font. We already support this with custom css, but these settings are similar to what the editor and integrated terminal expose and allow for a few basic customizations. Custom style sheets will override these.
2016-12-01 12:55:00 -08:00
Matt Bierner
b88a89c996 Allow markdown preview to scroll past content (#15919)
* Allow markdown preview to scroll past content

Issue #15795

Allows the markdown preview to scroll past its contents, like we do with the editor.

Closes #15795

* Toggle preview scroll beyond using editor.scrollBeyondLastLine
2016-11-29 14:51:15 -08:00
Matt Bierner
1957e44186 Delete emacs tmp file :( 2016-11-14 10:36:09 -08:00
Matt Bierner
eb563582f4 Add yaml front matter support for Markdown (#15218)
* Add language support for yaml front matter to markdown grammar

* Add option to strip yaml front matter from preview

* Use enum for setting instead of boolean

* Better names

* Fix merge error
2016-11-11 15:09:32 -08:00
Joao Moreno
2bb3dd5d95 enable duplicate imports tslint rule 2016-11-11 17:02:08 +01:00
Johannes Rieken
093cd8b2a3 enable integration tests again, cleanup a little of the ///-reference mess, #14059 2016-10-20 12:04:01 +02:00
Johannes Rieken
69a30b6531 tsfmt - extensions/markdown 2016-10-08 09:33:01 +02:00
kieferrm
6b01b4c0d8 lookup of custom style sheets, fixes #8287 2016-06-30 14:50:58 -07:00
kieferrm
a1f6aadfee Change default value from null to []; fixed #8283 2016-06-30 12:45:47 -07:00
Johannes Rieken
315f8c83bf on config changes, only update preview documents, fixes #8491 2016-06-29 13:52:06 +02:00
Johannes Rieken
0a386aea9c md extension should set baseUrl to document uri, webview should not override user baseUrl, fixes #7898 2016-06-27 13:59:16 +02:00
kieferrm
b985edc9f5 introduce activation telemetry 2016-06-21 20:32:50 -07:00
kieferrm
b9b2a6d895 refactoring 2016-06-21 20:31:27 -07:00
kieferrm
3410cb13ac fix double quotes 2016-06-21 20:26:32 -07:00
kieferrm
7e72a4d17a fix toggle markdown preview/source \w keybinding 2016-06-21 20:22:31 -07:00
Johannes Rieken
f23877c4ed md - differentiate between showPreview and showSource
having two distinct commands allows us to have a context menu action in the explorer to show a preview
2016-06-17 11:23:17 +02:00
Johannes Rieken
6a1b806b3d fix update regression 2016-06-16 17:59:13 +02:00
Johannes Rieken
8c2fb77935 add icons for preview and view source 2016-06-16 11:40:52 +02:00
kieferrm
7ca2e8cf1a add timeout to avoid spamming 2016-06-15 10:21:03 +02:00
Johannes Rieken
bd8100ae2a use new label param when calling previewHtml 2016-06-14 15:01:58 +02:00
Johannes Rieken
7465727a0a update preview on type, don't read document from disk 2016-06-14 15:01:58 +02:00
kieferrm
f3cc2709d6 remove theme awareness opt-in 2016-06-14 15:01:58 +02:00
kieferrm
43a55c165a code hygiene 2016-06-14 15:01:58 +02:00
kieferrm
0b856de5a7 prepackage markdown extension 2016-06-14 15:01:58 +02:00