AppFlowy-IO/appflowy-editor

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

Opened this issue · 5 comments

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

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.

You can check this PR. #739

Thank you @LucasXu0 !

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..!

Quite some refactor for a shrinkwrap to not work still