SerenityOS / serenity

The Serenity Operating System šŸž
https://serenityos.org
BSD 2-Clause "Simplified" License
30.69k stars 3.19k forks source link

Request for comments; rich text control #2476

Open nvella opened 4 years ago

nvella commented 4 years ago

Hi all,

I feel it would be a good idea if the system had a rich text editing control. This widget could be used currently in TextEditor (perhaps in the form of a 'rich text' mode not unlike Mac OS TextEdit), but also in the future in applications like email, note-taking, and blogging.

I could envision two ways in which to implement, both with their own pros and cons.

My personal leaning is more towards the simpler line-based control. I feel it would provide a simpler path towards implementing features which are more immediately in the path of development, like the rich TextEditor or email clients described above. There would also be nothing stopping us from later implementing contenteditable when the need arises.

bugaevc commented 4 years ago

The plan was to use HTML as the native rich text format (along with Markdown), and to base the rich text editing experience on HtmlView, to reuse all the layouting and styling logic we have there.

It doesn't have to be contenteditable, we could add some other unrelated semantics for it if there are issues with how contenteditable is defined.

My other hope was to eventually implement a typesetting application ā€” which would look somewhat like a usual rich text editor, but generate semantically marked up HTML/Markdown, and be able to typeset it to good looking static documents, perhaps PDF, even. Desktop publishing was a big thing in the 80s/90s that Apple and NeXT systems were competing at; I'm thinking we could try ourselves at that, with our technologies such as ā€” repeating myself here ā€” the semantic markup languages (Markdown, HTML) and the powerful layouting and styling engine (LibWeb).