@flogeez/angular-tiptap-editor

中文文档
3.14.1发布于 2026/11/10MITTypeScriptES Module构建来源已验证近 30 天下载 1.4万

A modern, customizable rich-text editor for Angular (18+), built with Tiptap and featuring complete internationalization support

原始使用文档
文档目录17 节
  1. ✨ Features
  2. 📦 Installation
  3. Icons
  4. 🚀 Quick Start
  5. 1. Global Setup
  6. 2. Basic Usage
  7. 3. Reactive Forms Integration
  8. ⚙️ Configuration
  9. 🧩 Advanced Features
  10. Image Upload Handler
  11. Image URL Resolver
  12. 🚀 More Advanced Capabilities
  13. 🌍 i18n & 🎨 Styling
  14. 🔧 Development
  15. 📝 License
  16. 🤝 Contributing
  17. 🔗 Links

/ATE — Angular Tiptap Editor

Angular Tiptap Editor

[!IMPORTANT] ^v3.0.0 uses Tiptap v3. If you need to stay on Tiptap v2, please use version ^2.4.1.

A modern, customizable Angular rich-text editor, built with Tiptap.

NPM Version Demo Try it on StackBlitz

High-performance Angular WYSIWYG editor. Built on top of Tiptap and powered by a native Signals architecture, it features a polished, professional design that feels, I think, clean and modern out of the box. Yet, I've worked to keep it fully customizable: you can easily configure the editor, tweak the UI, or even embed your own Angular components as interactive nodes.

Angular Tiptap Editor demo: slash commands, Markdown shortcuts, Notion mode, dark mode, block controls, bubble menu and table of contents


✨ Features

  • ⚡ Signal-Based: Native performance with ChangeDetectionStrategy.OnPush.
  • 📋 Table of Contents: Notion-style floating or inline TOC component with level-adapted dash collapse.
  • 🗂️ Global Editor Registry: Centralized AteEditorRegistry service to track, control, and switch between multi-editor instances.
  • 🧩 Angular Nodes: Embed any Angular component as an interactive editor node.
  • ⌨️ UX First: Slash commands (/) and context-aware bubble menus (Notion-like).
  • ✅ Task Lists: GFM-style checklists with nested sub-tasks, a / slash command, an optional toolbar button and themable checkbox CSS tokens.
  • 📊 Table Power: Advanced management with cell selection, merging, and sorting and filtering by column.
  • 🖼️ Pro Media: Image resizing, auto-compression, and custom uploaders.
  • 🌍 Built-in i18n: Support for English, French, German, Italian, Brazilian Portuguese, and Spanish out of the box.
  • 📎 Office-Ready: Clean pasting from Word and Excel, with control over what is kept from other apps (paste: colors, highlights, transformHTML hook).
  • 🎨 Highly Customizable: Easily configure toolbars, bubble menus, and slash command items.
  • 🛠️ Extensible: Easily add custom Tiptap extensions and reactive state calculators.
  • 🧩 Angular 18+ Support: Uses Angular 18's signals and esbuild for optimal performance.

📦 Installation

npm install @flogeez/angular-tiptap-editor

Add the styles to your angular.json:

{
  "styles": [
    ...
    "node_modules/@flogeez/angular-tiptap-editor/styles/index.css",
    ...
  ]
}

Icons

The library ships every icon it uses as inline SVG (Material Symbols, Apache 2.0): no icon font is required.

To use any Material Symbols name in your own toolbar items, bubble menus or slash commands, also load the font. Unregistered names fall back to it:

"node_modules/@fontsource/material-symbols-outlined/index.css",

Library icons are keyed by what they do, not by what they draw: bold, heading1, bulletList, link, unsetLink, addRowBefore, mergeCells, deleteTable, undo… (see the AteIconName type for the full list). Override any of them, use the built-in /ATE stroke set (ATE_STROKE_ICONS), or register your own icons with provideAteIcons at application bootstrap (app.config.ts / main.ts), or at runtime with inject(AteIconRegistry).register(...):

providers: [
  provideAteEditor(),
  provideAteIcons(ATE_STROKE_ICONS), // or pass a custom AteIcons map:
  provideAteIcons({
    bold: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="…"/></svg>', // full <svg>: any viewBox, keeps its own fill/stroke
    rocket: '<path d="…"/>', // or inner markup: Material Symbols viewBox (0 -960 960 960), filled with currentColor
  }),
];

Custom toolbar items, bubble menu items and slash commands can then use icon: "rocket". Icons are sized with 1em. Use currentColor in a full <svg> (fill or stroke) so it follows the text color, like the library icons do. Use <ate-icon name="…" /> to render them in your own components.

🚀 Quick Start

1. Global Setup

Initialize the library in app.config.ts:

export const appConfig: ApplicationConfig = {
  providers: [provideAteEditor()],
};

2. Basic Usage

import { AngularTiptapEditorComponent } from "@flogeez/angular-tiptap-editor";

@Component({
  selector: "app-example",
  standalone: true,
  imports: [AngularTiptapEditorComponent],
  template: `<angular-tiptap-editor
    [content]="content"
    (contentChange)="onContentChange($event)" />`,
})
export class ExampleComponent {
  content = "<p>Hello World!</p>";
  onContentChange(html: string) {
    console.log(html);
  }
}

3. Reactive Forms Integration

import { FormControl, ReactiveFormsModule } from "@angular/forms";

@Component({
  standalone: true,
  imports: [AngularTiptapEditorComponent, ReactiveFormsModule],
  template: ` <angular-tiptap-editor [formControl]="contentControl" /> `,
})
export class FormComponent {
  contentControl = new FormControl("<p>Initial content</p>");
}

⚙️ Configuration

The editor is fully configurable via the [config] input:

editorConfig: AteEditorConfig = {
  locale: "fr",
  placeholder: "Commencez à rédiger...",
  toolbar: { ...ATE_DEFAULT_TOOLBAR_CONFIG, highlight: true },
  slashCommands: { heading1: true, table: true },
};
InputTypeDescription
[config]AteEditorConfigGlobal config object (recommended)
[content]stringInitial HTML content
[editable]booleanRead-only toggle
[disabled]booleanDisabled toggle

See the API reference for the full list of inputs and configuration options.

🧩 Advanced Features

Image Upload Handler

Avoid base64 by providing a custom uploader (S3, Cloudinary, etc.):

The same handler is used for all file-based image insertions: toolbar picker, drag-and-drop, and clipboard paste.

uploadHandler: AteImageUploadHandler = ctx => {
  return this.http.post<any>("/api/upload", ctx.file).pipe(map(res => ({ src: res.url })));
};

Image URL Resolver

Images behind authentication? Use [imageSrcResolver] (or imageSrcResolver in [config]) to show a different URL (e.g. a blob: fetched with a token) while the document keeps the original src. See Images Behind Authentication.


🚀 More Advanced Capabilities

Looking for deeper integration patterns? Explore our Advanced Usage Guide:

🌍 i18n & 🎨 Styling

  • Languages: English (en), French (fr), German (de), Italian (it), Portuguese (pt, Brazilian wording) and Spanish (es) built-in. Detects browser language automatically (regional tags like pt-BR or es-MX resolve to their language). Set locale on one editor (input or config) to translate that instance only, with no effect on other editors or the global locale. Extend with AteI18nService.addTranslations().
  • Styling: Customize via CSS variables (e.g., --ate-primary, --ate-border-radius, and much more).
    • Links follow --ate-primary and --ate-primary-hover by default. Set --ate-link-color and --ate-link-hover-color to give links their own colors without changing the primary color.
  • Dark Mode: Works natively by adding .dark or [data-theme="dark"].

🔧 Development

npm install
npm run build:lib  # Build library
npm start          # Run demo

📝 License

MIT License - see LICENSE file for details.

🤝 Contributing

Contributions are welcome! See CONTRIBUTING.md for the setup, checks and conventions.

Made with ❤️ by FloGeez

版本与发布记录

@flogeez/angular-tiptap-editor 共发布 84 个版本,首次发布于 2025/08/20;过去 12 个月发布了 70 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
3.14.1latest2026/11/105 天前
3.14.02026/11/106 天前
3.13.32026/11/069 天前
3.13.22026/11/069 天前
3.13.12026/11/069 天前
3.13.02026/11/0312 天前

其他发布通道:v2-lts → 2.4.1。

关于 @flogeez/angular-tiptap-editor 的常见问题

@flogeez/angular-tiptap-editor 是什么?

A modern, customizable rich-text editor for Angular (18+), built with Tiptap and featuring complete internationalization support

如何安装 @flogeez/angular-tiptap-editor?

在项目目录运行 npm install @flogeez/angular-tiptap-editor,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:tippy.js(^6.3.7)、@tiptap/pm(^3.31.4)、@tiptap/core(^3.31.4)、@angular/core(>=18.0.0)、@angular/forms(>=18.0.0)、@angular/common(>=18.0.0)、@tiptap/markdown(^3.31.4)、@tiptap/extensions(^3.31.4)、@tiptap/starter-kit(^3.31.4)、@tiptap/extension-list(^3.31.4)、@tiptap/extension-color(^3.31.4)、@tiptap/extension-table(^3.31.4)、@tiptap/extension-heading(^3.31.4)、@tiptap/extension-highlight(^3.31.4)、@tiptap/extension-paragraph(^3.31.4)、@tiptap/extension-subscript(^3.31.4)、@tiptap/extension-text-align(^3.31.4)、@tiptap/extension-text-style(^3.31.4)、@tiptap/extension-superscript(^3.31.4)、@intevation/tiptap-extension-office-paste(^0.1.2)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@flogeez/angular-tiptap-editor 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@flogeez/angular-tiptap-editor 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@flogeez/angular-tiptap-editor 可以商用吗?

@flogeez/angular-tiptap-editor 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@flogeez/angular-tiptap-editor 的下载量有多少?

根据 npm 官方下载统计,@flogeez/angular-tiptap-editor 在 2026/10/15 – 2026/11/13 这 30 天内被下载 14,237 次,日均约 475 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@flogeez/angular-tiptap-editor 还在维护吗?

最新版本 3.14.1 发布于 2026/11/10(5 天前);至今共发布 84 个版本,其中过去 12 个月发布了 70 个;首次发布于 2025/08/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。