visual-space / visual-editor

Rich text editor for Flutter based on Delta format (Quill fork)
MIT License
290 stars 46 forks source link

Blocks - Editable links #10

Closed adrian-moisa closed 1 year ago

adrian-moisa commented 2 years ago

Can't edit links. Typing in a link splits the link. Can't remove links

The current behaviour for links is rather crude. They don't behave as typical word processing links. Text inside of links should be editable while preserving the metadata. This behaviour works just fine when applying such an edit for other attributes such as bold.

To the best of my current understanding typing in link should preserver the style. There must be some rule that overrides this behaviour. We need to check the callstack to see what exactly happens when inserting a char in a link.

As for editing links, look at how reddit, or google docs deal with the situation. We should follow the reddit solution. We can make use of the knowhow we have with markers and rectangles to position boxes near a link.

Technical suggestion

https://user-images.githubusercontent.com/11160141/169508793-b2eb6a73-00b2-4129-a31a-0ef7f1c1ba6d.mov

image image

Join on discord to get advice and help or follow us on YouTube Visual Coding to learn more about the architecture of Visual Editor and other Flutter apps.

DariusMuscalu commented 1 year ago

For styling:

DariusMuscalu commented 1 year ago

There are some small fixes to be done, like the styling in the above comment, and adding the functionality for the copy to clipboard button

https://user-images.githubusercontent.com/72706978/222151071-191321dd-24ba-45f7-a3cc-9a393476b4e8.mp4

DariusMuscalu commented 1 year ago

Also, we need to add collision detection image

adrian-moisa commented 1 year ago

Remaining issues: