docsy 0.1.3 copy "docsy: ^0.1.3" to clipboard
docsy: ^0.1.3 copied to clipboard

A modular WYSIWYG rich-text editor engine for Flutter. Provides the document model, editing commands, rendering, and image embeds for the Docsy ecosystem.

Docsy #

pub package likes popularity points

Docsy is the core Flutter editor package for the Docsy ecosystem. It provides:

  • the document model
  • the EditorController
  • the RichTextEditor widget
  • JSON serialization
  • block editing for paragraphs, headings, quotes, dividers, code blocks, lists, and image embeds

Markdown and HTML conversion live in the companion packages docsy_markdown and docsy_html.

Try it Live

Features #

  • WYSIWYG editing for Flutter
  • Inline formatting: bold, italic, underline, code, links
  • Block editing: paragraphs, headings, quotes, dividers, code blocks, list items, embeds
  • Undo and redo
  • JSON import/export through DocsyJson
  • Works on mobile, web, and desktop

Screenshots #

Editing mode Readonly mode
Docsy editing Docsy readonly

Installation #

Add this to your pubspec.yaml:

dependencies:
  docsy: ^0.1.3

Usage #

import 'package:docsy/docsy.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    final controller = EditorController(
      document: DocumentRoot(
        blocks: [
          ParagraphNode(
            inlines: const [TextSpanNode('Hello from Docsy')],
          ),
        ],
      ),
    );

    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Docsy Demo')),
        body: RichTextEditor(controller: controller),
        floatingActionButton: FloatingActionButton(
          onPressed: controller.insertParagraphAtEnd,
          child: const Icon(Icons.add),
        ),
      ),
    );
  }
}

Example #

For a complete demo with edit/view mode, toolbar actions, image insertion, and export dialogs, see the docsy_example package.

Contributing #

Contributions are welcome. Open an issue or submit a pull request if you want to improve Docsy.

License #

Licensed under the MIT License. See LICENSE for details.

5
likes
130
points
148
downloads
screenshot

Documentation

API reference

Publisher

verified publisherastrodevs.space

Weekly Downloads

A modular WYSIWYG rich-text editor engine for Flutter. Provides the document model, editing commands, rendering, and image embeds for the Docsy ecosystem.

Homepage
Repository (GitHub)
View/report issues

Topics

#editor #wysiwyg #rich-text

License

MIT (license)

Dependencies

characters, collection, flutter, flutter_highlight, meta, url_launcher, uuid

More

Packages that depend on docsy