AppFlowy/frontend/app_flowy/packages/appflowy_editor
2022-08-31 09:48:31 +08:00
..
assets/images feat: / supports inserting Quote #936 2022-08-30 17:42:28 +08:00
documentation docs: minor updates to documentation. 2022-08-18 20:59:47 +08:00
example feat: support customizing editor edges 2022-08-29 16:14:08 +08:00
lib fix: in the case of multiple selections, the highlighted state does not meet expectations. #948 2022-08-31 09:48:31 +08:00
test fix: in the case of multiple selections, the highlighted state does not meet expectations. #948 2022-08-31 09:48:31 +08:00
.gitignore chore: rename flowy_editor to appflowy_editor 2022-08-17 17:23:20 +08:00
.metadata chore: rename flowy_editor to appflowy_editor 2022-08-17 17:23:20 +08:00
analysis_options.yaml chore: rename flowy_editor to appflowy_editor 2022-08-17 17:23:20 +08:00
CHANGELOG.md chore: appflowy_editor 0.0.3 2022-08-29 20:11:42 +08:00
LICENSE chore: add LICENSE 2022-08-18 17:38:04 +08:00
pubspec.yaml chore: appflowy_editor 0.0.3 2022-08-29 20:11:42 +08:00
README.md chore: appflowy_editor 0.0.3 2022-08-29 20:11:42 +08:00

AppFlowy Editor

A highly customizable rich-text editor for Flutter

DiscordTwitter

Key Features

  • Allow you to build rich, intuitive editors
  • Design and modify it your way by customizing components, shortcut events, and many more coming soon including menu options and themes
  • Test-covered and maintained by AppFlowy's core team along with a community of more than 1,000 builders

Getting started

flutter pub add appflowy_editor
flutter pub get

How to use

Let's create a new AppFlowyEditor object

final editorState = EditorState.empty(); // an empty state
final editor = AppFlowyEditor(
    editorState: editorState,
    keyEventHandlers: const [],
    customBuilders: const {},
);

You can also create an editor from a JSON file

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

To get a sense for how you might use it, run this example:

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

How to customize

Customize a component

Please refer to customizing a component for more details.

Customize a shortcut event

Please refer to customizing a shortcut event for more details.

More Examples

  • Customize a component
    • Checkbox Text shows you how to extend new styles based on existing rich text components
    • Image teaches you how to extend a new node and render it
    • And more examples on rich-text plugins
  • Customize a shortcut event
    • BIUS shows you how to make text bold/italic/underline/strikethrough through shortcut keys
    • Paste HTML gives you an idea on how to handle pasted styles through shortcut keys
    • Need more examples? Check out Internal key event handlers

Glossary

Please refer to the API documentation.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. Please look at CONTRIBUTING.md for details.

License

Distributed under the AGPLv3 License. See LICENSE for more information.