TEI Author View
A tag-free, word-processor-like view of TEI and other XML files for VS Code and VSCodium.
The document is rendered with CSS:
verses as verses, headings as headings, <caesura/>, page breaks and footnote
anchors as small labels. You type in the text as in a word processor. The tags
cannot be damaged, and the XML file keeps its own indentation and line breaks.
It works on its own, and alongside TEI Scholar.
Version 0.1.3, 29 November 2026. Specified by Dominik Wujastyk; the program was vibe-coded by Claude Opus 5.5 (Anthropic).

Left: the XML source of Suśrutasaṃhitā 4.17.35–40. Right: the same verses in the Author view.
Install
VSCodium: in the Extensions view, search for TEI Author View and click Install. It comes from Open VSX, and VSCodium updates it automatically when a new version is published.
By hand (or in VS Code): download the latest tei-author-view-X.Y.Z.vsix from
Releases, then
Extensions view → ⋯ menu → Install from VSIX… → choose the file.
A copy installed this way is not updated automatically.
Use
| Action | Windows / Linux | Mac |
|---|---|---|
| Open the Author view beside the XML | Ctrl+Alt+A, or the preview button at the top right of the XML tab |
⌘⌥A |
| Back to the XML at the same spot | Ctrl+Alt+A in the Author view, or XML |
⌘⌥A |
| Open in place of the XML | right-click the tab → Reopen Editor With… → TEI Author View |
- Click anywhere in the text: a small pop-up names the element there (
l,trailer,lg#SS.6.64.1…), the element is outlined, and the bar at the bottom shows the full path, e.g.TEI › text › body › div#SS.6.64 › lg#SS.6.64.1 › lwith the element’s attributes. Click a step of the path to outline that element. - Typing, Backspace, Delete, paste change the text and are written to the XML
at once.
&,<and>are escaped for you. Undo/redo and Save work as usual (both views share one document). - Empty slots. An element written
<l/>or<l></l>shows as a dotted line you can type into;<l/>becomes<l>…</l>as soon as you type. Milestones such as<caesura/>,<lb/>,<pb/>,<anchor/>stay empty. - What it will not do (yet): delete across a tag, press Enter to start a new
<l>, or add, remove or wrap elements. You get a short message instead; switch to the XML (Ctrl+Alt+A) for those changes. - Tags (toolbar button) shows every start and end tag as a small marker.
- Footnotes made with TEI Scholar (
<anchor xml:id="…-n1"/>+<note target="#…-n1">in<standOff>) are numbered. Hover over the number to read the note; click it to jump to the note. Notes can be edited in place. - Cursor sync. If the XML is open beside the Author view, the two cursors follow each other.
- Comments (
<!-- … -->) are shown as grey labels and cannot be edited here.
Styling with your own CSS
The built-in stylesheet (media/tei-default.css) covers common TEI. Add your
own CSS files after it, in either of two ways:
- Setting
teiAuthor.stylesheets, e.g.["~/tei/susruta.css"](relative paths are taken from the XML file’s folder). - In the document:
<?xml-stylesheet type="text/css" href="susruta.css"?>
Selectors are the XML element and attribute names:
lg { margin: 1em 0; }
l:nth-child(2) { padding-left: 2em; } /* indent the second pāda line */
trailer { display: none; } /* hide the concordance notes */
div[type="adhyaya"] > head { text-align: center; }
caesura::before { content: " ‖ "; background: none; }
seg[type="commentary"] { font-size: .9em; color: #555; }
attr() works, e.g. pb::before { content: "[" attr(n) "]"; }. For xml:id
write [xml\:id] / attr(xml\:id).
oXygenxml stylesheets can be reused in part:
plain CSS works, oXygenxml’s own oxy_… functions do not. After editing a
stylesheet, press the ↻ button to reload it.
Settings for the font (teiAuthor.fontFamily, fontSize, lineHeight), the
click pop-up, cursor sync, and which empty elements are typeable are under
Settings → Extensions → TEI Author View.
How it works
The extension parses the XML with a small error-tolerant parser that records the character position of every element and every run of text. The view is built from that tree, with each XML element shown as an element of the same name, so ordinary CSS applies. Each keystroke becomes a small change at a known position in the file, checked against the current text before it is applied. If the check fails (e.g. the file was changed elsewhere), the view is redrawn from the file. So the XML is never re-serialised, and the view can never write markup.
Development
npm install
npm test # parser and edit-mapping tests
PW=<path to playwright> npx tsx test/view.e2e.ts # typing tests in Chrome
xvfb-run node test/integration/run.js # opens the view in real VS Code
npm run package # → tei-author-view-X.Y.Z.vsix (not committed)
Releasing a new version: raise version in package.json, update
CHANGELOG.md, commit and push, then publish a GitHub release with the tag
vX.Y.Z. The Release workflow builds and tests the extension, attaches the
.vsix to the release and publishes it on Open VSX (it needs the repository
secret OVSX_PAT, an Open VSX access token).
Credits
Specified by Dominik Wujastyk (University of Alberta), 28 November 2026, for transcription work on the Suśruta Project. The code was vibe-coded by Claude Opus 5.5 (Anthropic) to that specification.
Licence
MIT