Lucas.Xu 68f983ed2a docs: rename extending.md 2 rokov pred
..
assets 35bafbaadc feat: implement popup list service 2 rokov pred
documentation 68f983ed2a docs: rename extending.md 2 rokov pred
example 93565269f0 docs: extending.md 2 rokov pred
lib 2224aa271e docs: add documentation for selectable 2 rokov pred
test ad26f9c86d fix: checkbox + underline doesn’t work when the checkbox is checked 2 rokov pred
.gitignore 35d5bc92ac chore: publish preparation 2 rokov pred
.metadata 76999c6a46 feat: add flowy_editor package 2 rokov pred
CHANGELOG.md 3945a64820 chore: publish preparation 2 rokov pred
LICENSE 76999c6a46 feat: add flowy_editor package 2 rokov pred
README.md 68f983ed2a docs: rename extending.md 2 rokov pred
analysis_options.yaml 76999c6a46 feat: add flowy_editor package 2 rokov pred
pubspec.yaml 2d04f79e10 chore: publish preparation 2 rokov pred

README.md

FlowyEditor

An completely customize, test-covered rich text editing component for Flutter

Features

  • Customize
    • Support customizing components.
    • Support customizing shortcut event.
    • Support customizing toolbar and popup list. (WIP)
    • Support customizing theme and any styles. (WIP)
  • Test-covered
    • Current code coverage >= 63%, we will still continue to add more test cases.

Due to the extensible structure and the increase in functionality, we encourage each commit to add test case code under test to ensure that the other committer does not have to worry about their code affecting the existing logic as much as possible. For more testing information, please check TESTING.md

Getting started

flutter pub add flowy_editor
flutter pub get

Usage

Creates editor with empty document

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

Creates editor from JSON file

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

How to customizes ...

Customizing a component

Please refer to customizing.md for more details.

Customizing a shortcut event

Please refer to customizing.md for more details.

Code Examples

  • Customizing a component.
    • Checkbox Text - Showing how to extend new styles based on existing rich text components.
    • Image - Showing how to extend a new node and render it.
    • More examples. Rich text plugins
  • Customizing a shortcut event.
    • BIUS - Showing how to make text bold/italic/underline/strikethrough through shortcut keys
    • Paste HTML - Showing how to handle pasted styles through shortcut keys
    • More examples. Internal key event handlers

Glossary

We are working on more detailed instructions, for now 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.