AppFlowy-IO / appflowy-editor

A highly customizable rich-text editor for Flutter. The AppFlowy Editor project for AppFlowy and beyond.
https://pub.dev/packages/appflowy_editor
Other
434 stars 183 forks source link

[FR] Make the Position Fixed at a place for Toolbar #734

Open dawarepramod4 opened 6 months ago

dawarepramod4 commented 6 months ago

Description

I want to use appflowy inside an already created list.. and also i want method so that instead of floating toolbar i want to have a toolbar which is stick to a place... or anywhere on the page ... (it should add height as i add new line... while inside another scrollview)

Impact

  1. Users who want to use the appflowy with their own widgets inside a list can use this featrure.

Additional Context

No response

Xazin commented 6 months ago

We used to support shrinkWrapping, but after major refactoring of the selection handling, we broke the shrinkWrap.

Try to pass shrinkWrap: true to both the AppFlowyEditor and the EditorScrollController.

Edit: Seems I recalled wrongly, we do support shrinkWrap for editable mode as well, it just has degraded performance!


To shortly address your second issue, with a sticky toolbar, we could definitely add a simple API for this along with example usage.

LucasXu0 commented 6 months ago

You can check this PR. https://github.com/AppFlowy-IO/appflowy-editor/pull/739

dawarepramod4 commented 6 months ago

Thank you @LucasXu0 !

dawarepramod4 commented 6 months ago

We used to support shrinkWrapping, but after major refactoring of the selection handling, we broke the shrinkWrap.

Try to pass shrinkWrap: true to both the AppFlowyEditor and the EditorScrollController.

Edit: Seems I recalled wrongly, we do support shrinkWrap for editable mode as well, it just has degraded performance!

To shortly address your second issue, with a sticky toolbar, we could definitely add a simple API for this along with example usage.

Thank you @Xazin. i will try this workaraound for shrinkwrapping in my code..!

cyberpwnn commented 2 months ago

Quite some refactor for a shrinkwrap to not work still