2022-08-16 15:47:48 +08:00
..
2022-08-03 16:34:11 +08:00
2022-08-16 15:47:48 +08:00
2022-08-16 15:08:51 +08:00
2022-08-16 15:47:48 +08:00
2022-08-16 15:08:51 +08:00
2022-08-16 15:47:48 +08:00
2022-07-11 18:07:36 +08:00
2022-08-16 15:47:48 +08:00
2022-07-11 18:07:36 +08:00
2022-08-16 15:47:48 +08:00
2022-08-16 15:47:48 +08:00

一个易于扩展,测试覆盖的 flutter 富文本编辑组件

Features

  • 易于扩展的
    • 支持扩展不同样式的视图
    • 支持定制快捷键解析
    • 支持扩展toolbar/popup list样式(WIP)
    • ...
  • 协同结构 ready *
  • 质量保证的
    • 由于可扩展的结构以及随着功能的增多我们鼓励每个提交的文件或者代码段都可以在test下增加对应的测试用例代码尽可能得保证提交者不需要担心自己的代码影响了已有的逻辑。

Getting started

flutter pub add flowy_editor
flutter pub get

Usage

Empty document

final editorState = EditorState.empty();
final editor = FlowyEditor(
    editorState: editorState,
    keyEventHandlers: const [],
    customBuilders: const {},
);

从JSON文件中读取

final json = ...;
final editorState = EditorState(StateTree.fromJson(data));
final editor = FlowyEditor(
    editorState: editorState,
    keyEventHandlers: const [],
    customBuilders: const {},
);

For more. Run the example.

git clone https://github.com/AppFlowy-IO/AppFlowy.git
cd frontend/app_flowy/packages/flowy_editor/example
flutter run

Examples

  • 样式扩展
    • Checkbox text - 展示如何基于已有的富文本组件扩展新的样式,
    • Image - 展示如何扩展新的节点,并且渲染
  • 快捷键扩展
    • BUIS - 展示如何通过快捷键对文字进行加粗/下划线/斜体/加粗
    • 粘贴HTML - 展示如何通过快捷键处理粘贴的样式

Documentation

  • 术语表

Additional information

目前正在完善更多的文档信息

  • Selection

我们还有很多工作需要继续完成链接到contributing.md Project checker link.