Skip to content

Flutter plain text editor that supports unicode text formatting.

License

Notifications You must be signed in to change notification settings

Enough-Software/enough_text_editor

Repository files navigation

An API-based plain text editor for Flutter that support unicode text formatting.

Features

  • Supports to be used in any scenarios:
    • with editor chrome: The PackagedTextEditor includes additional chrome for choosing bold, italic, underline or strike through text as well as selecting an unicode font.
    • without editor chrome: The TextEditor still has all the editing options but integrated in the text selection overlay menu.
    • with a separate chrome from the editor: SliverHeaderTextEditorControls along with TextEditor, to be used in a CustomScrollView with a sticky editor chrome.
    • in any custom scenario: as the TextEditor is API based you can create your own chrome or extend it easily, for example by defining your own overlay menu items.

Getting started

Add the dependency to enough_text_editor in your pubspec.yaml file:

# (to be done after releasing this package to pub.dev)

Usage

With editor chrome / single line mode:

PackagedTextEditor(
    isSingleLine: true,
    showClearOption: true,
    onCreated: (api) {
        _editorApi = api;
    },
    initialContent:
    '''Hello world, this is an example text for you to edit!''',
);

With editor chrome / multiple lines mode:

PackagedTextEditor(
    isSingleLine: false,
    minLines: 3,
    onCreated: (api) {
        _editorApi = api;
    },
    initialContent:
    '''Hello world, this is an example text for you to edit!''',
);

Without editor chrome:

TextEditor(
    isSingleLine: true,
    label: const Text('Subject'),
    onCreated: (api) {
        _editorApi = api;
    },
    initialContent:
    '''My subject''',
);

Additional information

TODO: Tell users more about the package: where to find more information, how to contribute to the package, how to file issues, what response they can expect from the package authors, and more.

About

Flutter plain text editor that supports unicode text formatting.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages