Skip to main content

Introduction

AppFlowy Editor provides a comprehensive plugin system that enables you to import and export documents in various formats. These plugins allow seamless integration with other editors and document formats.

Available Plugins

Markdown

Import and export Markdown documents with full formatting support

HTML

Convert between HTML and AppFlowy document format

Quill Delta

Support for Quill Delta format for compatibility with Quill editor

PDF Export

Export your documents to PDF format

Word Count

Track word and character counts in real-time

Plugin Architecture

All format plugins follow a consistent encoder/decoder pattern:
  • Encoders: Convert AppFlowy Document objects to external formats (Markdown, HTML, etc.)
  • Decoders: Parse external formats and create AppFlowy Document objects
  • Codecs: Combine encoders and decoders using Dart’s Codec class

Common Use Cases

Importing Documents

Initialize the editor with content from various sources:
import 'package:appflowy_editor/appflowy_editor.dart';

// From Markdown
final markdown = '# Hello World';
final editorState = EditorState(
  document: markdownToDocument(markdown),
);

// From HTML
final html = '<h1>Hello World</h1>';
final editorState = EditorState(
  document: htmlToDocument(html),
);

Exporting Documents

Export editor content to different formats:
final document = editorState.document;

// To Markdown
final markdown = documentToMarkdown(document);

// To HTML
final html = documentToHTML(document);

Custom Parsers

Each plugin supports custom parsers to extend functionality:
  • Node Parsers: Handle specific node types during encoding
  • Element Parsers: Process special elements during decoding
  • Custom Syntaxes: Add support for custom markdown syntax
See individual plugin documentation for details on implementing custom parsers.

Next Steps

Markdown Plugin

Learn about markdown import/export

HTML Plugin

Work with HTML documents

Build docs developers (and LLMs) love