Pelcrow for VS Code
Pelcrow adds a structured visual editor for Markdown and MDITA while keeping the repository text file canonical.
Features
- Open
.md and .markdown files with Pelcrow Visual Editor.
- Edit headings, emphasis, links, lists, code, images, and source-preserving Markdown tables.
- Apply and remove MDITA
data-props conditions from the selection inspector.
- Edit repository-defined YAML metadata with required-field and allowed-value feedback.
- See Pelcrow metadata diagnostics in VS Code Problems.
- View and edit canonical key references and content references as semantic tokens.
- Navigate from a keyref or conref to its workspace definition.
- Switch back to the source editor at any time.
When Pelcrow cannot safely preserve a construct, the custom editor presents a source-mode fallback instead of rewriting the document.
Getting started
- Open a Markdown document.
- Run Pelcrow: Open Visual Editor, or use Open With... and select Pelcrow Visual Editor.
- Use the Properties panel for frontmatter and the Selection panel for conditions, images, and references.
- Use Open Source whenever you need direct control over the MDITA source.
The extension reads metadata rules from .pelcrow/config.json. Local/self-hosted workspaces may instead use pelcrow.config.json with metadataSchemaFile. Set pelcrow.configPath when the server config is outside the workspace root.
Commands
Pelcrow: Open Visual Editor
Pelcrow: Open Visual Editor to Side
Pelcrow: Open Source
Pelcrow: Open Reference Target
Current safety boundary
Canonical empty <span data-keyref="..."></span>, <span data-conref="..."></span>, and <div data-conref="..."></div> elements are supported visually. Key-definition containers, references with nested content or additional attributes, and raw HTML tables remain source-only.
Development
From the repository root:
npm install
npm run typecheck
npm run test
npm run package:vsix --workspace pelcrow-vscode
The packaged extension is written to vscode/pelcrow-vscode.vsix.