Skip to content

Phase 1: Kerebron Markdown webview editor#7

Open
horner wants to merge 1 commit into
mainfrom
phase1-kerebron-webview-editor
Open

Phase 1: Kerebron Markdown webview editor#7
horner wants to merge 1 commit into
mainfrom
phase1-kerebron-webview-editor

Conversation

@horner

@horner horner commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

Implements Phase 1 of the plan: embedding the Kerebron editor as a Markdown
custom editor inside VS Code.

Changes

  • Custom editor: MarkdownEditorProvider now serves a real webview instead of a placeholder <pre>. It:
    • Registers for .ededit files (Markdown content, so it no longer clashes with the built-in .md editor) at default priority.
    • Builds HTML with a locked-down CSP (nonce + wasm-unsafe-eval/unsafe-eval required by the tree-sitter emscripten glue).
    • Syncs the document ↔ ProseMirror via WorkspaceEdit, with a lastSyncedText echo guard to break the edit loop.
  • Build: adds a Vite build:webview task (deno run -A npm:vite build) wired into build / vscode:prepublish; media/ build output is gitignored.
  • Deno workspace: enumerates Kerebron package members, adds an import map (prosemirror, yjs, web-tree-sitter, vite, etc.), nodeModulesDir: auto, and raw-imports.
  • Language: contributes the ededit language + language-configuration.json.
  • Samples: adds samples/back-pain-encounter.md.

Plan status

Phase 1 checklist items are now checked off in plan.md.

Testing

  • Manual: open a .ededit file, edit in the webview, confirm the document updates and external edits reflect back.

- Register CustomTextEditorProvider for .ededit files (Markdown content,
  avoids clashing with the built-in .md editor)
- Bundle Kerebron editor + extension-markdown into a Vite-built webview
  with a locked-down CSP (nonce + wasm-unsafe-eval for tree-sitter)
- Sync document <-> ProseMirror via WorkspaceEdit with an echo guard to
  break the edit loop
- Add deno workspace members, import map, and vite build task
- Add .ededit language contribution and language-configuration.json
- Add sample back-pain-encounter.md; ignore media/ build output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant