Applowy Editor Fork
A rich-text editor for Flutter maintained independently by shichunlei. It is based on AppFlowy Editor 6.2.0 and includes updated dependencies and a fix for lists that jump when a footer is present.
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
Getting Started
The package requires Flutter 3.44 or later and Dart 3.12 or later in the Dart 3 series.
flutter pub add applowy_editor_fork
Creating Your First Editor
Start by creating a new empty AppFlowyEditor object.
import 'package:applowy_editor_fork/applowy_editor_fork.dart';
final editorState = EditorState.blank(withInitialText: true);
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,
);
Register the editor's localization delegate in MaterialApp.
MaterialApp(
localizationsDelegates: const [
AppFlowyEditorLocalizations.delegate,
],
);
Copy the minimal example
into the lib/main.dart of a Flutter app that depends on the package, or run the full demo
from the fork's repository.
git clone https://github.com/shichunlei/appflowy-editor.git
cd appflowy-editor/example
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.
- See further examples of how AppFlowy custom the 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:
- Todo List Block Component demonstrates how to extend new styles based on existing rich text components
- Divider Block Component demonstrates how to extend a new block component and render it
- See further examples of AppFlowy
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
To switch from appflowy_editor, change the dependency name and replace imports
with package:applowy_editor_fork/applowy_editor_fork.dart. Plugins that pass
editor objects to your app must use the fork's types as well.
See the upstream migration guide for changes between AppFlowy Editor versions.
Glossary
Please refer to the API documentation.
Contributing
Report fork-specific issues in the fork's issue tracker.
License
AppFlowy Editor is available under MPL-2.0 and AGPL-3.0. The fork is distributed under MPL-2.0 and retains the upstream license text and notices. See LICENSE.
Libraries
- applowy_editor_fork
- AppFlowyEditor library