Skip to content

Latest commit

 

History

History
68 lines (54 loc) · 4.74 KB

NOTES.md

File metadata and controls

68 lines (54 loc) · 4.74 KB

Scripts

# Set up (see https://code.visualstudio.com/api/working-with-extensions/publishing-extension)
npm install -g vsce

# Build and package
(cd ./ckeditor5-build-markdown && npm run build)
# Remember to increment the version in package.json
vsce package
code --force --install-extension $(find -name "markdown-wysiwyg*" | tail -1)

# Publish extension
vsce publish
npx ovsx publish -p ${OVSX_TOKEN}

# Run CKEditor5 subproject
(cd ./ckeditor5-build-markdown && npm start)

Architecture

Implements a CustomTextEditor for markdown (.md) files.

Our CustomTextEditor implementation (called MarkdownEditorProvider) is defined in markdownEditor.js and registers a webview to show the user when that editor is active

Communication between the webview and VS Code is done using vscode.postMessage and is described here

The method getHtmlForWebview defines what this webview looks like, in our case importing and rendering a custom CKEditor5 build for markdown from the folder ckeditor5-build-markdown. It then runs markdownEditorInitScript inside the webview to register.

TODO

- one

- two
- three
  • Don't clear undo history on save