followthemoney1 / fleather

Soft and gentle rich text editing for Flutter applications.

Home Page:https://pub.dev/packages/fleather

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fleather & Parchment codecov pub package

Fleather

banner Soft and gentle rich text editing for Flutter applications based on Zefyr. It uses a document model named Patchment based on Notus.

Features

  • Works on Android, iOS, Web, macOS, Linux and Windows
  • Inline attributes like bold, italic, strikethrough and etc.
  • Line attributes like direction, alignment, heading, number and bullet list and etc.
  • Block attributes like code, quote and etc.
  • Supports inline and block embeds
  • Markdown-inspired semantics
  • Supports markdown shortcuts
  • Using Quill.js Delta as underlying data format by Parchment, Fleather is ready for collaborative editing using OT (Not provided as a built-in functionality)

Get started

Add Fleather to your dependencies.

dependencies:
  flutter:
    sdk: flutter
  fleather: ^1.7.0

Usage

For a complete working project using Fleather, check our example.

  1. Create a FleatherController
document = ParchmentDocument.fromJson(json);
controller = FleatherController(document);
  1. Add FleatherEditor or FleatherField with a FleatherToolbar to your widgets.
Column(
  children: [
    FleatherToolbar.basic(controller: _controller!),
    Expanded(
      child: FleatherEditor(controller: controller),
    ),
    //or
    FleatherField(controller: controller)
  ],
),

Migration

For migration guides check out MIGRATION.md.

Credits

About

Soft and gentle rich text editing for Flutter applications.

https://pub.dev/packages/fleather


Languages

Language:Dart 94.4%Language:C++ 2.5%Language:CMake 2.2%Language:Ruby 0.4%Language:C 0.2%Language:Swift 0.2%Language:HTML 0.1%Language:Kotlin 0.0%Language:Objective-C 0.0%