memspace / zefyr

Soft and gentle rich text editing for Flutter applications.
https://zefyr-editor.gitbook.io
2.22k stars 551 forks source link

Zefyr 1.0 development updates #409

Open pulyaevskiy opened 3 years ago

pulyaevskiy commented 3 years ago

Hi everyone,

I wanted to post this as an announcement that there is currently work in progress on the new version of Zefyr which will be eventually released as a stable 1.0 version.

There is a lot of changes in this version, it's practically an almost complete rewrite of the package, but it comes with quite a few benefits.

You can head over to https://memspace.github.io/zefyr/#/ and see the editor for yourself in its current state.

image

Note that this is a very early dev version so it's buggy. In addition, Flutter's Web support is still not on par with the rest of the platforms and there are some pretty basic limitations in the engine itself. So don't get surprised if formatting text with bold breaks the entire thing (it does).

The main reason I wanted to get it out there is to let everyone know that there has been some progress lately. Also this is the reason I'm not looking at any PRs at the moment. I'd like to get 1.0-dev branch into a good shape first and then go over the open issues and PRs in order to see which ones are still relevant and if they can be incorporated in the 1.0 release.

The best way for you to stay updated on the progress here is to subscribe to this issue. I will be posting updates in comments below.

The first dev release is out on Pub: https://pub.dev/packages/zefyr/versions/1.0.0-dev.1.0

I'd encourage everyone to give it a try and see if things are working well. Make sure to checkout the changelog for migration instructions.

JacobWrenn commented 3 years ago

Can someone please confirm whether singerdmx/flutter-quill has anything to do with Zefyr? All that happens in my issue #485 is people telling me to go there instead!

imyashadulkar commented 3 years ago

Hey, guys, I have 4 zefyr editors on a single page and whenever I try to press space it creates issues. Like it goes to the toolbar. I have used different controllers and focus Node. Also, there is a page when space works only when I am writing characters quickly If I just press space then it does not work. Collaborators, Can you please help me with my issue. I need to submit this project to the client asap

SF-Simon commented 3 years ago

Hi, it's been three months since the last code merge. In the future, can the relevant update code be merged into the project in time? Even the beta version.

@pulyaevskiy pu @GyuriMajercsik @cgestes

m-j-g commented 3 years ago

Hi, it's been three months since the last code merge. In the future, can the relevant update code be merged into the project in time? Even the beta version.

@pulyaevskiy pu @GyuriMajercsik @cgestes

Could use an update to support flutter 2 and updated url_launcher dependency

GyuriMajercsik commented 3 years ago

Hi, it's been three months since the last code merge. In the future, can the relevant update code be merged into the project in time? Even the beta version.

@pulyaevskiy pu @GyuriMajercsik @cgestes

It would be really nice but I am just a contributor / user of this plugin. @pulyaevskiy is the owner and he very probably has other stuff on his plate.

singerdmx commented 3 years ago

@GyuriMajercsik is there some kind of other communication channel that people can reach out to him? For example, flutter-quill has a Slack Group If not, you guys may want to create one similar

aleripe commented 3 years ago

Has this project been abandoned?

britannio commented 3 years ago

Has this project been abandoned?

@pulyaevskiy hasn't been active in a while and he's the only one that can accept PRs atm. Judging by the number of forks and PRs in this repository, the community is large enough to keep this moving forward.

singerdmx commented 3 years ago

flutter-quill is active and will be able to take PRs if it helps you guys. It is very close to Zefyr. We use it for Bullet Journal App flutter-quill is under MIT license and no constraint for commercial use for anyone. We have slack group to join.

johnnak commented 3 years ago

build fails with flutter 2.0.0.

ERROR /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/zefyr-0.12.0/lib/src/widgets/selection.dart:659:42: Error: Too few positional arguments: 8 required, 7 given. final toolbar = controls.buildToolbar(

zefyr: ^0.12.0

flutter --version Flutter 2.0.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 60bd88df91 (26 hours ago) • 2021-03-03 09:13:17 -0800 Engine • revision 40441def69 Tools • Dart 2.12.0

opun-ai241 commented 3 years ago

@GyuriMajercsik is there some kind of other communication channel that people can reach out to him? For example, flutter-quill has a Slack Group If not, you guys may want to create one similar

I think creating a slack group and having a dedicated fork would be the way to go. I can create the group and fork and start adding people if there is enough support for it.

hyouuu commented 3 years ago

Agreed that we should use a fork for now until the owner becomes active again. I'd propose my fork which fixed some bugs & compilation for flutter 2, and brought some enhancements. You can see the code changes here: https://github.com/memspace/zefyr/pull/479

opun-ai241 commented 3 years ago

Sounds good. @hyouuu we can use your fork.

👋 Let’s move this to Slack! It’s a faster, simpler way to talk shop, share files, and work together. You can sign up here: https://join.slack.com/t/newworkspace-opq5273/shared_invite/zt-ni38p7u9-BDtnqptI72setbBWbWNclA

aleripe commented 3 years ago

Wouldn't it be better to start from scratch?

opun-ai241 commented 3 years ago

Wouldn't it be better to start from scratch?

What do you mean by scratch?

aleripe commented 3 years ago

I mean a completely new editor. I see too many compromises with Zefyr, first of all not being fully compatible with Quill.

singerdmx commented 3 years ago

flutter-quill is fully compatible with Quill. It is under MIT license and no constraint for commercial use for anyone. If you do not have Zefyr-based production data yet, it is a better choice.

singerdmx commented 3 years ago

Actually what is the license for Zefyr? I don't see it in github

aleripe commented 3 years ago

flutter-quill is fully compatible with Quill. It is under MIT license and no constraint for commercial use for anyone. If you do not have Zefyr-based production data yet, it is a better choice.

I might evaluate it tomorrow... my app will be launched in the next month or so, last step missing is the text editor.

hyouuu commented 3 years ago

I think people come to zefyr because there is no better option available yet. If someone could come up with a new editor without compromises that would be awesome, but I can see it's a rather complicated project. Please do share your evaluation of flutter-quill as it will help others :)

florianh01 commented 3 years ago

flutter-quill is fully compatible with Quill. It is under MIT license and no constraint for commercial use for anyone. If you do not have Zefyr-based production data yet, it is a better choice.

I can confirm that. I switched my project from Zefyr to Flutter-Quill today. I think it would make more sense to concentrate development on one editor.

aleripe commented 3 years ago

flutter-quill is fully compatible with Quill. It is under MIT license and no constraint for commercial use for anyone. If you do not have Zefyr-based production data yet, it is a better choice.

I can confirm that. I switched my project from Zefyr to Flutter-Quill today. I think it would make more sense to concentrate development on one editor.

I second that.

opun-ai241 commented 3 years ago

flutter-quill is fully compatible with Quill. It is under MIT license and no constraint for commercial use for anyone. If you do not have Zefyr-based production data yet, it is a better choice.

I can confirm that. I switched my project from Zefyr to Flutter-Quill today. I think it would make more sense to concentrate development on one editor.

Well if the transition went smoothly, I don't see why not just support flutter-quill. Are there any major differences between the packages to be aware of? @florianh01

hyouuu commented 3 years ago

Would also love to learn what features and scopes your project used @florianh01 to see what aspects are covered in the transition

florianh01 commented 3 years ago

In principle, the packages are very similar. I think Zefyr can be easily replaced with Flutter Quill at least 90% of the time.

Flutter Quill also supports more formatting options such as colored text. Dark mode is also considered here where I had my concerns at the beginning.

However, I have no experience in inserting images as I do not need this function in my app.

But: Flutter Quill can only be used if no Zefyr documents have been created yet. A document created with Zefyr Editor cannot be displayed in Quill Editor.

If you have any questions feel free to ask.

singerdmx commented 3 years ago

But: Flutter Quill can only be used if no Zefyr documents have been created yet. A document created with Zefyr Editor cannot be displayed in Quill Editor.

Yes, because Zefyr's data format is not 100% Quill Format while Flutter Quill is 100% compliant with Quill Format

hyouuu commented 3 years ago

Thanks @florianh01 ! @singerdmx could you add image & horizontal divider examples in the sample? zefyr dev supports them although not documented

singerdmx commented 3 years ago

@hyouuu it is already in sample page under https://github.com/singerdmx/flutter-quill/blob/master/app/lib/main.dart

image

singerdmx commented 3 years ago

Check out https://github.com/singerdmx/flutter-quill/blob/master/app/lib/pages/home_page.dart#L139

image

It supports local image, network image and base-64 encoded image

hyouuu commented 3 years ago

What about not using QuillToolbar? How about horizontal divider?

singerdmx commented 3 years ago

No support for horizontal divider yet. But you are welcome to submit a pull request to add that. Please make sure that the data format is compliant with Quill Format

https://stackoverflow.com/questions/37525867/how-can-i-add-a-new-format-hr-tag-to-quill-js

singerdmx commented 3 years ago

Anyone who wants to be the collaborator of flutter-quill please me know. I will add you.

image

SF-Simon commented 3 years ago

I looked at the buill, hoping to expose more methods. For example, the number of characters in the line, the characters obtained according to the index, and so on. Refer to UITextView, because of advanced requirements, more flexibility is needed.

On Sat, Mar 6, 2021 at 11:55 AM Xin Yao notifications@github.com wrote:

Anyone who wants to be the collaborator of flutter-quill https://github.com/singerdmx/flutter-quill please me know. I will add you.

[image: image] https://user-images.githubusercontent.com/122956/110194310-b3f71380-7dec-11eb-873f-6cd265b14d41.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/memspace/zefyr/issues/409#issuecomment-791860228, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACV6CIKSXM7AMRKWSEOHPQDTCGRTHANCNFSM4R5LHQ6Q .

singerdmx commented 3 years ago

@HeebeLee you can either submit a pull request or become a collaborator (you can directly commit to repo)

li3317 commented 3 years ago

Hi all, our repo supports some additional features such as supporting custom font size as well as supporting redo and undo : screenshot Feel free to check out our repo https://github.com/singerdmx/flutter-quill , thanks!

amantoux commented 3 years ago

Hi all, our repo supports some additional features such as supporting custom font size as well as supporting redo and undo : Feel free to check out our repo https://github.com/singerdmx/flutter-quill , thanks!

Is it ready for concurrent document edition?

singerdmx commented 3 years ago

Hi all, our repo supports some additional features such as supporting custom font size as well as supporting redo and undo : Feel free to check out our repo https://github.com/singerdmx/flutter-quill , thanks!

Is it ready for concurrent document edition?

No, no plan for that. There are too much work to do before even thinking about that.

ArjanAswal commented 3 years ago

Is it ready for concurrent document edition?

I think this is possible as you can assign a listener to the quill editor controller and wrap the editor inside a snapshot builder. Then whenever something changes, you can update the delta data on the server (eg Firestore) and then the editor widget automatically rebuilds on another device.

This is not really a package specific feature but more of an implementation on the app side.

kwestlund commented 3 years ago

Coordination is required to update the document with both outgoing user-generated changes and incoming server changes.

Assuming a server with support for OT, here is the algorithm needed to be implemented on the client-side:

1) For each delta produced by changes made to the document by the user:

Care must be taken with regard to asynchronous behavior around changes to the document. In-between user edits, all of the above state changes must be accomplished synchronously, which may require support from the editor.

Ken

On Mar 15, 2021, at 4:07 AM, Arjan Aswal @.**@.>> wrote:

Is it ready for concurrent document edition?

I think this is possible as you can assign a listener to the quill editor controller and wrap the editor inside a snapshot listener. Then whenever something changes, you can update the delta data on the server (eg Firestore) and then the editor widget automatically rebuilds on another device.

This is not really a package specific feature but more of an implementation on the app side.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/memspace/zefyr/issues/409#issuecomment-799207580, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEDZRD3PHLZX2CYWLFNN3O3TDW557ANCNFSM4R5LHQ6Q.

agarwalrohit2503 commented 3 years ago

Zefyr is not working for flutter version 2.0.2 Any suggestions how can we make it work

featzima commented 3 years ago

@agarwalrohit2503 We supports own fork of Zefyr. You can easily enable it by adding the following lines to pubspec.yml:

dependencies:
  zefyr:
    git:
      url: git://github.com/glynskyi/zefyr.git
      path: packages/zefyr
      ref: "6f7408d"
  notus:
    git:
      url: git://github.com/glynskyi/zefyr.git
      path: packages/notus
      ref: "6f7408d"
amantoux commented 3 years ago

@featzima are you also working on v1.0? if yes, maybe we can help each other

All, I'm working on the 1.0-dev version on my spare time while @pulyaevskiy is not available So far, it is working (basically) on mobile, but needs some work to be fully functional on web

To not hesitate to test and contribute to https://github.com/amantoux/zefyr/tree/1.0-dev-master

galvin59 commented 3 years ago

Hi @amantoux Thanks for providing your fork. I can hardly find documentation, I tried to update from a previous version of Zefyr to yours, but I got errors, apparently ZefyrScaffold and ZefyrView are not available anymore, do you have any ideas of what they have been replaced by ?

amantoux commented 3 years ago

Hi @amantoux Thanks for providing your fork. I can hardly find documentation, I tried to update from a previous version of Zefyr to yours, but I got errors, apparently ZefyrScaffold and ZefyrView are not available anymore, do you have any ideas of what they have been replaced by ?

No, indeed, in v1, simple add a ZefyrEditor to the containing widget and set a ZefyrController (pretty similar to TextField widget and TextEditingController)

final controller = ZefyrContoller();
Widget(
  child: ZefyrEditor(
    controller: controller,
   [other options]
  ),
)
galvin59 commented 3 years ago

@amantoux thanks a lot ! and what about ZefyrView to simply display the content of a document (and not edit it) ? Is there an equivalent remaining in this version ?

amantoux commented 3 years ago

@amantoux thanks a lot ! and what about ZefyrView to simply display the content of a document (and not edit it) ? Is there an equivalent remaining in this version ?

There is a readOnly' attribute toZefyrEditor`

You can look at the examples in the branch, they are updated

featzima commented 3 years ago

If someone needs Zefyr on steroids just try Zefyrka package.

Zefyrka is a fork of Zefyr package with the following improvements:

viet06061999 commented 3 years ago

I want to insert some text to last document but it has a exception, i tried many way but no way doing image image

aleripe commented 3 years ago

If someone needs Zefyr on steroids just try Zefyrka package.

Zefyrka is a fork of Zefyr package with the following improvements:

  • support of Flutter 2.0
  • opt-in the null safety
  • text color
  • background color
  • paragraph alignment
  • paragraph indentation

Is Zefyrka abandoned too? No answer to issues on GitHub...

featzima commented 3 years ago

@aleripe We`re fixing all critical issues and compatibility issues with Flutter for Zefyrka. Some requested improvement are in our roadmap and we will fix them soon. However other are not. So you can always send the PR for a requested feature and we will say thank you for contributing =)