Documentation

    Scribe Editor

    A modern, inline-first rich text editor with a simple API. Use direct methods like editor.bold() — no complex commands needed.

    Simple API

    Direct methods like .bold(), .italic(), .link()

    Lightweight

    < 50KB gzipped, zero dependencies

    Universal

    Works with React, Vue, Svelte, or Vanilla JS

    Secure

    Built-in XSS protection & sanitization

    Iframe Ready

    Edit content inside iframes

    Extensible

    Plugin architecture for custom features

    Quick Start

    Get started with Scribe in seconds. Choose your framework:

    <!-- One-line initialization -->
    <div id="editor">
      <p>Start editing...</p>
    </div>
    
    <script type="module">
      import { Scribe } from './scribe.js';
      
      const editor = Scribe.init('#editor');
      
      // Direct methods - no exec() needed
      editor.bold();
      editor.link('https://example.com');
    </script>

    Installation

    NPM / Yarn / PNPM

    npm install scribejs-editor
    # or
    yarn add scribejs-editor
    # or
    pnpm add scribejs-editor

    CDN (Script Tag)

    <script src="https://unpkg.com/scribejs-editor"></script>
    
    <script>
      const editor = Scribe.init('#editor');
    </script>

    Live Demo

    Select text to see the floating toolbar. Try formatting, links, and more.

    Documentation

    Getting Started

    Install via npm or CDN and initialize the editor in one line with Vanilla JS, React or Vue 3.

      Framework Guides

      Integrate with Vanilla JS, React, Vue 3, Svelte and Web Components, plus SSR with Next.js and Nuxt.

      Features

      Feature matrix: links, images, tokens, inline widgets, toolbar positioning, mobile, paste sanitization and shortcuts.

      Advanced

      Performance, the plugin architecture, real-time collaboration, XSS hardening and accessibility.

      API Reference

      Every method and event: init(), bold(), link(), getHTML(), selection methods, toolbar state and sanitization config.

      Migration

      Move from TinyMCE, Quill or a legacy editor: plugins, toolbar API, selection and content model.

      How-to guides

      All guides →

      Demo Gallery

      Inline Editor

      Floating toolbar

      Document Mode

      Long-form writing

      Iframe Editor

      Isolated document
      Loading toolbar...

      Textarea + Fixed Toolbar

      Always-on controls

      Editor Comparison

      FeatureScribeTinyMCEQuillTiptap
      Bundle size< 50KB~400KB~100KB~150KB
      Direct API methods✓✗✗✓
      Iframe editing✓✓✗✗
      Floating toolbar✓✓✓✓
      Plugin system✓✓✓✓
      TypeScript✓✓Partial✓
      Framework agnostic✓✓✓React focus
      Zero dependencies✓✗✗✗
      Built-in sanitization✓✓✗✗
      CRDT readyPrepared✗✗Via Yjs