Getting Started
Syncline Editor is a zero-dependency, pixel-perfect browser code editor. Virtual rendering handles 100k+ line files. Full TypeScript declarations. Works in every modern browser and every framework.
Installation
Install from npm:
Quick Start (ES Module)
Call createEditor() with a container element and optional config:
React Integration
Use useRef + useEffect to mount the editor and call destroy() on unmount:
Next.js (App Router)
Mark the file 'use client' because the editor uses browser APIs.useEffect ensures it only initialises on the client:
CDN / No Build Tool
Drop the UMD bundle into any HTML page:
Common Config Options
A quick reference for the most frequently used options. See the full Configuration page for every option.
| Option | Type | Default | Description |
|---|---|---|---|
value | string | string[] | '' | Initial document content. String or pre-split string[]. |
language | Language | 'typescript' | Syntax highlighting and autocomplete language. |
theme | string | ThemeDefinition | '' (VR Dark) | Built-in theme ID or a full ThemeDefinition object. |
showGutter | boolean | true | Show/hide the line-number gutter. |
showMinimap | boolean | true | Show/hide the canvas minimap panel. |
showStatusBar | boolean | true | Show/hide the bottom status bar. |
wordWrap | boolean | false | Soft-wrap long lines at wrapColumn. |
readOnly | boolean | false | Block all edits. Navigation and copy still work. |
tabSize | number | 2 | Spaces per Tab press. |
fontSize | number | 13 | Font size in pixels. |
lineHeight | number | 22 | Row height in pixels. |
onChange | (value: string) => void | undefined | Fired after every content change. |
onCursorChange | (pos: CursorPosition) => void | undefined | Fired when the cursor moves. |
Next Steps
© 2026 Syncline Editor. All rights reserved.