olmps / memo

Memo is an open-source, programming-oriented spaced repetition software (SRS) written in Flutter.
BSD 3-Clause "New" or "Revised" License
1.82k stars 158 forks source link

[Collection Creation] - Rich text field component #218

Closed ggirotto closed 2 years ago

ggirotto commented 2 years ago

Summary

This component consists of a visual TextField that has a bold title and when tapped opens a rich text editor in a modal, which allows the user to create a rich text content using this editor, which exposes the stylish (bold, italic, underline, etc) actions in a toolbar above the keyboard.

This component can be reused in any context that supports a rich text field. Two examples are the description field in the New Collection Page and the Question and Answer fields when creating new Memos (See screenshots below).

New Collection Page Description ![CleanShot 2021-10-27 at 17 33 07](https://user-images.githubusercontent.com/11745745/139142718-200e28a7-76f1-47fd-8ed5-ef23fc4989da.png)
Question and Answer fields ![CleanShot 2021-10-27 at 17 33 44](https://user-images.githubusercontent.com/11745745/139142788-5383f68d-1950-4909-8519-2ccfac9d868b.png)

Business Rules

Screenshots

Empty field (placeholder) ![CleanShot 2021-10-27 at 17 28 51](https://user-images.githubusercontent.com/11745745/139142322-d772c6b7-2aaf-4876-9675-a6379e94af57.png)
Fulfilled field ![CleanShot 2021-10-27 at 17 29 03](https://user-images.githubusercontent.com/11745745/139142385-cdd9366a-6ad8-4772-9735-02a086838816.png)
Open editor ![CleanShot 2021-10-27 at 17 28 59](https://user-images.githubusercontent.com/11745745/139142417-904a4bcd-5f9a-4604-b94b-547784cc737b.png)