asynts / writer

a word processor in python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Writer

About

This is a word processor similar to Microsoft Word or LibreOffice Writer. My goal is to support the core features without getting tied up in details.

I originally started this project because I wanted to add a Writer application to Serenity OS. Maybe, that will still happen at some point in the future, but I no longer have plans to do so at the moment.

The problem is, that this whole thing is much more challenging than expected. I thought that I could simply create a wrapper for a web browser and thus use HTML/CSS for rendering. Then I would write some C++ code that deals with all the interaction logic and connects to LibWeb and the file system.

However, I quickly realized that this would not work, because of paging. Paging is the process of taking the text and deciding on which page it should be rendered. This is a chicken-egg problem where the layout can influence the structure of the page, which itself infuences the layout.

Since CSS is not capable of modifying the DOM and the support for CSS3-REGIONS was removed from browsers, there is no way to get this working. There are workarounds, but I ultimately decided to create my own rendering engine ditching the web browser entirely. I stated working on a prototype in Python, which became this project.

Demo

This is in an early state of development. Currently, the following features are supported:

  • Placing cursor with mouse.

  • Inserting text with keyboard.

  • Deleting with backspace key.

  • Undoing and redoing actions.

  • Breaking paragraphs across pages.

This video hasn't been updated to the current state of the project.

0003_demo.mp4

About

a word processor in python


Languages

Language:Python 99.6%Language:Shell 0.4%