百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

domternal

> 前端框架
开源

基于 ProseMirror 构建的现代、可扩展的丰富文本编辑器工具包。开箱即用的经典和 Notion 样式编辑器。或者选择无头模式,从 65 多个树状组件中组装。

193 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

基于 ProseMirror 构建的现代、可扩展的丰富文本编辑器工具包。开箱即用的经典和 Notion 样式编辑器。或者选择无头模式,从 65 多个树状组件中组装。

Domternal

A rich text editor toolkit built on ProseMirror, with a headless core and first-class Angular, React, Vue, and Vanilla components. Take the core alone and drive the DOM yourself, add the toolbar and theme for a finished editor, or mount the components for your framework. Notion-style block editing, drag handle, slash menu and floating outline are included. JavaScript exports are tree-shakeable; the optional theme ships as one complete CSS stylesheet. Website · Getting Started · Packages & Bundle Size

Live examples - full editors for Angular, React, Vue, and Vanilla, editable in the browser

Features

  • Headless core - use with any framework or vanilla JS/TS
  • Angular components - editor, toolbar, bubble menu, floating menu, emoji picker, notion color picker (Angular 17.1+, signals, OnPush, zoneless-ready)
  • React components - composable Domternal component, toolbar, bubble menu, floating menu, emoji picker, notion color picker, custom node views (React 18+)
  • Vue components - composable Domternal component, useEditor/useEditorState composables, toolbar, bubble menu, floating menu, emoji picker, notion color picker, custom node views (Vue 3.3+)
  • Vanilla wrapper - framework-free class-based API for Astro, Svelte, Solid, plain HTML, and Web Components - editor, toolbar, bubble menu, floating menu, emoji picker, notion color picker
  • Notion-style block UX - drag-to-reorder, block context menu, slash command, smart paste, keyboard reorder, floating Table of Contents, from @domternal/extension-block-controls and @domternal/extension-toc, with preset: 'notion' for the layout and preset-aware behavior
  • Print to paper or PDF - printDocument() leaves your app's chrome off the page, and the theme's paper layer applies to the reader's own Ctrl/Cmd+P with no code involved
  • 70+ extensions across core and 10 extension packages - nodes, marks, and behavior extensions
  • 130+ chainable commands - editor.chain().focus().toggleBold().run()
  • Full table support - cell merging, column resize, row/column controls, cell toolbar
  • Tree-shakeable JavaScript - import only the JavaScript exports you use; the optional @domternal/theme deliberately ships one complete stylesheet
  • ~52 KiB minified and gzipped (own code), ~133 KiB minified and gzipped total with runtime dependencies - see Packages for the full bundle breakdown
  • TypeScript first - every package builds under strict, with exactOptionalPropertyTypes and noUncheckedIndexedAccess
  • 17,000+ automated test executions - unit coverage and a Playwright matrix across four demo apps
  • Light and dark theme - 150+ CSS custom properties for full visual control
  • Inline styles export - getHTML({ styled: true }) produces inline CSS ready for email clients, CMS, and Google Docs
  • SSR helpers - generateHTML, generateJSON, generateText for server-side rendering

Quick Start

Headless (Vanilla JS/TS)

bash
pnpm add @domternal/core
typescript
import { Editor, Document, Text, Paragraph, Bold, Italic, Underline } from '@domternal/core';

const editor = new Editor({
  element: document.getElementById('editor')!,
  extensions: [Document, Text, Paragraph, Bold, Italic, Underline],
  content: '
Hello World!
',
});

The example above wires the minimum schema by hand to show the headless model; in practice use StarterKit for a batteries-included setup with headings, lists, code blocks, history, and more.

Getting Started Guide - headless core, themed UI with toolbar, and Angular/React/Vue component setup

Version compatibility

The 1.1.1 patch release fixes column insertion in resized tables. Existing editor APIs and saved document formats remain compatible. Upgrade installed @domternal/* packages together to 1.1.1: wrappers require core `>=1.1.0 = 22 and pnpm >= 10.

License

The source code is available under the MIT License. Use of the Domternal name and logo is governed by the Trademark Usage Policy.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptangularangular-editoreditorheadless

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架