Soft and gentle rich text editing for Flutter applications.

Overview

About Zefyr

Build Status codecov

Soft and gentle rich text editing for Flutter applications.

You are viewing early dev preview version of this package which is no longer actively maintained. To follow latest updates see dev releases for 1.0.0-dev.x versions. You can learn more about upcoming 1.0.0 release here: https://github.com/memspace/zefyr/issues/409

For questions and general discussions check out our Spectrum community.

Clean and modern look

Zefyr's rich text editor is built with simplicity and flexibility in mind. It provides clean interface for distraction-free editing. Think Medium.com-like experience.

Markdown-inspired semantics

Ever needed to have a heading line inside of a quote block, like in this Markdown block:

I'm a Markdown heading

And I'm a regular paragraph

Zefyr can deliver exactly that:

Ready for collaborative editing

Zefyr's document model uses data format compatible with Operational Transformation which makes it possible to use for collaborative editing use cases or whenever there is a need for conflict-free resolution of changes.

Zefyr editor uses Quill.js Delta as underlying data format. Read more about Zefyr and Deltas in our documentation. Make sure to checkout official documentation for Delta format as well.

Comments
  • ZefyrField can not remove the last character on dev-1.0

    ZefyrField can not remove the last character on dev-1.0

    Steps to Reproduce

    NOTE: This issue is found on dev-1.0.

    1. Load an empty Notus document (I can reproduce this in the original Zefyr example code, as long as the loaded document is empty which means it only contains "\n")
    2. Try to type in a few words like "abc abc babc abc", but not too long
    3. Try to remove all the content by pressing/holding backspace
    4. Pressing backspace can not delete the last character

    Demo: bug

    Logs

    No specific log
    
    [✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.6 19G73 darwin-x64, locale en)
        • Flutter version 1.22.6 at /Users/teq-ios/development/flutter
        • Framework revision 9b2d32b605 (2 weeks ago), 2021-01-22 14:36:39 -0800
        • Engine revision 2f0af37152
        • Dart version 2.10.5
    
     
    [!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
        • Android SDK at /Users/teq-ios/Library/Android/sdk
        • Platform android-30, build-tools 30.0.2
        • ANDROID_HOME = /Users/teq-ios/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
        ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
    
    [✓] Xcode - develop for iOS and macOS (Xcode 12.4)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 12.4, Build version 12D4e
        • CocoaPods version 1.10.0
    
    [!] Android Studio (version 4.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    
    [✓] Connected device (1 available)
        • iPhone X (mobile) • 0E7083D8-7982-4E96-9DB7-67D5085D2094 • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator)
    
    ! Doctor found issues in 2 categories.
    
    
    opened by khanhnguyen-96 41
  • Change bold and italic to toggle on/off

    Change bold and italic to toggle on/off

    I would suggest to change the bold and italic text style buttons to toggle their respective styles on or off for all following entries.

    The current implementation only allows for changing currently marked text to bold/italic, it however makes things very complicated if you mark your last typed text as bold/italic, since this means that all following text is automatically marked as bold or italic without the simple option to turn it off again.

    IMHO the option to mark selected text as bold or italic should be kept, if no text is currently selected however the respective buttons should toggle the text styles on/off as described above.

    opened by stemuk 24
  • I can't run zefyr in flutter web

    I can't run zefyr in flutter web

    Steps to Reproduce

    1. ... I can't install in flutter web project
    2. ...
    3. ...

    Logs

    Resolving dependencies...
    Because zefyr >=0.1.2 depends on flutter any from sdk which is forbidden, zefyr >=0.1.2 is forbidden.
    So, because login_page depends on zefyr ^0.5.0, version solving failed.
    
    opened by Lykeosovandara 21
  • [v1.0-dev] Handle click on embed object

    [v1.0-dev] Handle click on embed object

    First of all, many thanks for this great package. I am using v1.0-dev, it comes with more ability of customization embed objects and it works well in aspect of rendering object. But I face a problem when I try to handle click event on my embed object, such as: click on Play button on my object. The editor always captures the click event and make the object to be selected state, click events don't hit my button at all. How to get my button work in this case? Thanks in advance.

    bug 1.0 
    opened by hnvn 20
  • Problem when text takes up more space than the ZefyrField height

    Problem when text takes up more space than the ZefyrField height

    In your example of a ZefyrField in a form, I set a height of 100. If I write a lot of text I exceed this height, from the moment that the text takes up more space than 100, then every time I type a char the text in ZefyrField "jump". It seems like it scrolls from beginning to the end very quickly.

    N.B. The problem is only when a single paragraph is higher than 100. If I use a new line before to reach the limit, there is no problem.

    In form.dart i set:

    return ZefyrTheme( data: theme, child: ZefyrField( height: 100.0, decoration: InputDecoration(labelText: 'Description'), controller: _controller, focusNode: _focusNode, autofocus: true, imageDelegate: CustomImageDelegate(), physics: ClampingScrollPhysics(), ), );

    Logs

    None logs, it's only a graphics effect.

    [✓] Flutter (Channel stable, v1.9.1+hotfix.2, on Mac OS X 10.14.6 18G87, locale it-IT) • Flutter version 1.9.1+hotfix.2 at /Users/marcobencivenni/flutter • Framework revision 2d2a1ffec9 (11 days ago), 2019-09-06 18:39:49 -0700 • Engine revision b863200c37 • Dart version 2.5.0

    [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • Android SDK at /Users/marcobencivenni/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 28.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405) • All Android licenses accepted.

    [✓] Xcode - develop for iOS and macOS (Xcode 10.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.3, Build version 10G8 • CocoaPods version 1.7.5

    [✓] Android Studio (version 3.5) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 39.0.3 • Dart plugin version 191.8423 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

    [✓] IntelliJ IDEA Community Edition (version 2019.2.2) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 39.0.5 • Dart plugin version 192.6603.23

    [✓] VS Code (version 1.37.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.4.1

    [!] Connected device ! No devices available

    bug 1.0 
    opened by mbenci 18
  • Error: The non-abstract class 'InputConnectionController' is missing implementations for these members: - 'updateFloatingCursor'

    Error: The non-abstract class 'InputConnectionController' is missing implementations for these members: - 'updateFloatingCursor'

    Steps to Reproduce

    1. Upgrade Flutter to Stable build 1.2
    2. Build/Run

    Logs

    The error is as follows

    Error: The non-abstract class 'InputConnectionController' is missing implementations for these members: - 'updateFloatingCursor'
    
    opened by mpfaff 18
  • Non-scrollable but expandable editor

    Non-scrollable but expandable editor

    Is there a way to let ZefyrEditor expand downward as user type?

    For example, I can achieve this behavior with TextField Widget by wrap it in a LayoutBuilder and set the maxline parameter to null:

    ListView(
      children: <Widget>[
        Container(
          color: Colors.grey,
          child: LayoutBuilder(builder: (context, size) {
            return TextField(
              controller: controller,
              maxLines: null,
            );
          }),
        ),
      ],
    ),
    

    I tried the wrap ZefyrEditor in a LayoutBuilder, and the editor simply not showing. If it is not possible, and I want to fork and work on it, where should I start?

    feature 
    opened by AverageChau 15
  • List creation and divider issue

    List creation and divider issue

    I took some time off last weekend to test the Zefyr editor and to record some footage of the issues that I encountered. During that process I found two rather minor issues, one concerning the creation of ordered and unordered lists, one concerning the divider functionality.

    List creation issue: https://streamable.com/62rn4 Divider issue: https://streamable.com/ze8yj

    The issue with the List creation only seems to occur on non-emulated android devices (the footage was recorded on a physical Android 7.1.1 device), since I couldn't reproduce it on my emulated Android device. The Divider issue can be reproduced on emulated Android devices as well, and throws the error:

    W/IInputConnectionWrapper( 3850): getTextBeforeCursor on inactive InputConnection
    

    which would make me think that it is caused by a race condition.

    Edit: I just looked at the footage again and it seems like zefyr has a problem with auto corrected text, both in the List creation issue and when you mark text as bold/italic. Lists creation seems to work fine until you have an autocorrect suggestion and decide NOT to use it and press enter. In this case the autocorrect suggestion seems to be used anyway (and not the original text you typed) and the error occurs.

    opened by stemuk 14
  • How to use text input and toolbar separately

    How to use text input and toolbar separately

    Hi @pulyaevskiy, first of all thanks for this great RTE!

    How can I use the editor and the toolbar separately? I can see in your source code that ZefyrEditor is composed by a ZefyrEditableText into an Expanded widget and a ZefyrToolbar; how can I use them to achieve what you can see in the image below?

    zefyr-editor

    I need to use the editor ("inline" and not "fullscreen") in a screen with other widgets (post title, post subtitle, images carousel, ..) and maybe set the toolbar in a different and custom position.

    Could you please provide some example?

    Thank you!

    zefyr feature 
    opened by ivtod 14
  • Is this lib deprecated or not?

    Is this lib deprecated or not?

    Flutter latest update breaks all in this lib, doesn't anyone notice this??

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel master, v1.10.15-pre.405, on Mac OS X 10.14.6 18G71a, locale en-CN)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    [✓] Xcode - develop for iOS and macOS (Xcode 11.0)
    [!] Android Studio (not installed)
    [✓] Connected device (2 available)
    
    
    opened by jinfagang 13
  • parsing json and save to json

    parsing json and save to json

    Hi @pulyaevskiy ,

    Please help me, how we save to format json and parsing fromJson on NotusDocument besause I try it someting wrong with my format rror Parsing JSON: FormatException: Control character in string (at character 26)

    from save I just do with jsonEncode and call document variable of NotesDocument and parsing with jsondecode and NotusDocument.fromJson

    opened by edicybereye 12
Rich Text renderer that parses Contentful Rich Text JSON object and returns a renderable Flutter widget

Contentful Rich Text Renderer for Flutter Rich Text renderer that parses Contentful Rich Text field JSON output and produces a Flutter Widget tree tha

Kumanu 45 Nov 10, 2022
A powerful extended official text for Flutter, which supports Speical Text(Image,@somebody), Custom Background, Custom overFlow, Text Selection.

Extended official text to build special text like inline image or @somebody quickly,it also support custom background,custom over flow and custom selection toolbar and handles.

FlutterCandies 509 Jan 4, 2023
A Flutter package to parse text and make them into linkified text widget

?? Flutter Parsed text A Flutter package to parse text and extract parts using predefined types like url, phone and email and also supports Regex. Usa

Fayeed Pawaskar 213 Dec 27, 2022
Rich coin project of flutter

rich_coin flutter实现RichCoin项目。 Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

null 0 Nov 27, 2021
Text Editor in Flutter for Android and iOS to help free write WYSIWYG HTML code

Flutter Summernote Text Editor in Flutter for Android and iOS to help free write WYSIWYG HTML code based on Summernote 0.8.18 javascript wrapper. NOTI

Chandra Abdul Fattah 41 Sep 12, 2022
A masked text for Flutter.

flutter_masked_text Masked text input for flutter. Alert Hi guys! Unfortunately, I'm not developing mobile anymore. This repo will not receive updates

Ben-hur Santos Ott 264 Dec 21, 2022
Flutter widget that automatically resizes text to fit perfectly within its bounds.

Flutter widget that automatically resizes text to fit perfectly within its bounds. Show some ❤️ and star the repo to support the project Resources: Do

Simon Leier 1.8k Jan 3, 2023
A simple Flutter package that makes turning a FAB into a text field easy.

flutter_text_field_fab A simple Flutter widget that makes turning a FAB into a text field easy.

Haefele Software 4 Jan 18, 2022
Arc Text Widget for Flutter

Flutter Arc Text Renders text along the arc. See demo. The story behind the plugin is here. Basic usage class MyApp extends StatelessWidget

Kirill Bubochkin 15 Oct 18, 2021
A Tricky Solution for Implementing Inline-Image-In-Text Feature in Flutter.

A Tricky Solution for Implementing Inline-Image-In-Text Feature in Flutter.

Bytedance Inc. 646 Dec 29, 2022
A customizable code text field supporting syntax highlighting

CodeField A customizable code text field supporting syntax highlighting Live demo A live demo showcasing a few language / themes combinaisons Showcase

Bertrand 162 Dec 23, 2022
Statistics Dart package for easy and efficient data manipulation with many built-in functions and units.

statistics Statistics package for easy and efficient data manipulation with many built-in mathematical functions and units. Usage Numeric extension: i

Graciliano Monteiro Passos 13 Nov 7, 2022
A Flutter Package to render Mathematics, Physics and Chemistry Equations based on LaTeX

flutter_tex Contents About Demo Video Screenshots How to use? Android iOS Web Examples Quick Example TeXView Document TeXView Markdown TeXView Quiz Te

Shahzad Akram 219 Jan 5, 2023
Flutter textfield validation lets you validate different textform fields in your Flutter app

Flutter textfield validation lets you validate different textform fields in your Flutter app

World-Package 2 Sep 15, 2022
A markdown renderer for Flutter.

Flutter Markdown A markdown renderer for Flutter. It supports the original format, but no inline HTML. Overview The flutter_markdown package renders M

Flutter 828 Aug 12, 2021
flutter 中文排版,支持分页上下对齐 两端对齐 翻页动画

text_composition flutter 中文排版 分页 上下对齐 两端对齐 多栏布局 弃用richText,使用Canvas,精确定位绘图位置,消除字体对排版影响 视频与截图 demo https://github.com/mabDc/text_composition/releases/t

西红柿大芝麻 50 Nov 3, 2022
Flutter Tutorial - PDF Viewer - Asset, File, Network & Firebase

Flutter Tutorial - PDF Viewer - Asset, File, Network & Firebase Use the Flutter PDF Viewer to download PDF documents and display them within your Flut

Johannes Milke 36 Dec 9, 2022
Create an AutoComplete TextField to search JSON data based on suggestions in Flutter.

Flutter Tutorial - AutoComplete TextField & AutoComplete Search Create an AutoComplete TextField to search JSON data based on suggestions in Flutter.

Johannes Milke 32 Oct 23, 2022
Flutter phone number input

phone_form_field Flutter phone input integrated with flutter internationalization Features Totally cross platform, this is a dart only package / depen

cedvdb 38 Dec 31, 2022