搜索插件、代码仓与 APP 分类

appflowy_editor 封面
插件详情v6.2.0

appflowy_editor

一个高度可定制的富文本编辑器,适用于 Flutter。AppFlowy 编辑器项目,适用于 AppFlowy 及其以外的应用。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1.6万
喜欢数
517
Pub 分数
60

安装插件

flutter pub add appflowy_editor

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

AppFlowy Editor 是一个高度可定制的富文本编辑器,专为 Flutter 构建,旨在跨多个平台支持高级文本编辑功能。它能够无缝集成 Markdown、HTML 和结构化内容,注重可扩展性和性能。适用于需要动态文档编辑的应用程序,它驱动 AppFlowy 的核心功能,同时保持对更广泛用例的适应性。该编辑器支持实时协作功能,并为开发者提供模块化架构,以扩展行为和外观。

适合场景

  • 文档创建和编辑
  • Markdown富内容渲染
  • 协作式笔记应用
  • 可定制的内容管理系统
  • 用于文本工作流的可扩展 UI 组件

主要特点

  • 高度可定制的设计和行为
  • 跨平台支持(Android、iOS、Web、macOS、Windows、Linux)
  • 内置的 Markdown 和 HTML 解析
  • 模块化插件架构
  • 实时协作就绪
  • 可扩展的事件系统

适合对象

  • 开发富文本编辑器的开发者
  • 创建协作生产力工具的团队
  • 需要结构化文档处理的应用程序
  • 需要跨平台一致性的项目
  • 内容密集型应用中的可定制用户界面组件

使用建议

  • 需要理解 Flutter 的 widget 树
  • 由于模块化,学习曲线更陡峭
  • 可能需要额外设置才能实现实时同步
  • 性能取决于自定义插件的复杂性
  • 除了基本用法外,文档有限

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

AppFlowy Editor

A highly customizable rich-text editor for Flutter

Discord • Twitter

Key Features

  • Build rich, intuitive editors
  • Design and modify an ever-expanding list of customizable features including
    • block components (such as form input controls, numbered lists, and rich text widgets)
    • shortcut events
    • themes
    • selection menu
    • toolbar menu
  • Test Coverage and ongoing maintenance by AppFlowy's core team and community of more than 1,000 builders
Preview Customize your own theme
Preview Customize your own theme
Change the color of your text Format your text
Color Format

Getting Started

Add the AppFlowy editor Flutter package to your environment.

flutter pub add appflowy_editor
flutter pub get

Creating Your First Editor

Start by creating a new empty AppFlowyEditor object.

final editorState = EditorState.blank(withInitialText: true); // with an empty paragraph
final editor = AppFlowyEditor(
  editorState: editorState,
);

You can also create an editor from a JSON object in order to configure your initial state. Or you can create an editor from Markdown or Quill Delta.

final json = jsonDecode('YOUR INPUT JSON STRING');
final editorState = EditorState(document: Document.fromJson(json));
final editor = AppFlowyEditor(
  editorState: editorState,
);

Note: The parameters localizationsDelegates need to be assigned in MaterialApp widget

MaterialApp(
  localizationsDelegates: const [
    AppFlowyEditorLocalizations.delegate,
  ],
);

To get a sense of how the AppFlowy Editor works, run our example:

git clone https://github.com/AppFlowy-IO/appflowy-editor.git
flutter pub get
flutter run

Customizing Your Editor

Customizing theme

Please refer to our documentation on customizing AppFlowy for a detailed discussion about customizing theme.

Customizing Block Components

Please refer to our documentation on customizing AppFlowy for a detailed discussion about customizing components.

Below are some examples of component customizations:

Customizing Shortcut Events

Please refer to our documentation on customizing AppFlowy for a detailed discussion about customizing shortcut events.

Below are some examples of shortcut event customizations:

  • BIUS demonstrates how to make text bold/italic/underline/strikethrough through shortcut keys
  • Need more examples? Check out shortcuts

Migration Guide

Please refer to the migration documentation.

Glossary

Please refer to the API documentation.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Please look at CONTRIBUTING.md for details.

License

All code contributed to the AppFlowy Editor project is dual-licensed, and released under both of the following licenses:

  1. The GNU Affero General Public License Version 3
  2. The Mozilla Public License, Version 2.0 (the “MPL”)

See LICENSE for more information.

所属分类

依赖

依赖清单 20 项

源码仓库

使用此插件的项目