npm Package
Everything you need to know about installing, importing, and integrating @synclineapi/editor in any JavaScript environment.
Installation
Dependencies
0
Zero runtime deps
ESM gzip
~42 kB
Tree-shakeable
UMD gzip
~48 kB
CDN/require build
Themes
6
Built-in, no downloads
ES Module (Bundler)
Import directly in Vite, webpack, Rollup, esbuild, or any other modern bundler:
CommonJS
CDN / No Bundler
Load from jsDelivr directly in a <script> tag — no build step required:
React Integration
Next.js App Router
The editor accesses DOM APIs at mount time — mark the component as a Client Component and use dynamic() to disable SSR:
Exports
| Export | Kind | Description |
|---|---|---|
createEditor | function | Create an editor instance in a DOM container. |
EditorAPI | type | Interface of all methods on an editor instance. |
EditorConfig | type | Full configuration object type. |
CompletionItem | type | Shape of a static or dynamic completion entry. |
CompletionContext | type | Argument to provideCompletions callback. |
HoverContext | type | Argument to provideHover callback. |
HoverDoc | type | Return value shape for provideHover. |
ThemeDefinition | type | Schema for a full custom theme object. |
TokenColors | type | Record<string, string> colour overrides map. |
CursorPosition | type | { line: number; column: number } |
Selection | type | { anchor, head, text } |
Language | type | 'typescript' | 'javascript' | 'css' | 'json' | 'markdown' |
dist/ Contents
| File | Format | Description |
|---|---|---|
dist/syncline-editor.js | ESM | Tree-shakeable ES module. |
dist/syncline-editor.umd.js | UMD | Universal build (CDN / CommonJS). |
dist/syncline-editor.css | CSS | Base styles & Shadow DOM resets. |
dist/index.d.ts | TypeScript | Type declarations for all exports. |
Browser Support
Syncline Editor requires a modern browser with Shadow DOM v1, ResizeObserver, and Canvas support. Tested against:
© 2026 Syncline Editor. All rights reserved.