4 ms·
Oh Jesus we've already been through this. I sincerely hope the LibreOffice team wisens up and looks at other group's efforts to try and do the same. Mozilla Be
by simonsarris 15y ago
Oh Jesus we've already been through this. I sincerely hope the LibreOffice team wisens up and looks at other group's efforts to try and do the same.
Mozilla Bespin became Mozilla Skywriter became "fuck it, we shouldn't have used HTML5 Canvas as a text editor" and merged with Ace, which uses plain old divs and not Canvas. It's not glamorous. But it's sane. (http://ace.ajax.org http://ace.ajax.org)
The Canvas spec has an entire section devoted to why making a complex text editor rendered in Canvas is a bad idea:
* Mouse placement of the caret has to be reimplemented.
* Keyboard movement of the caret has to be reimplemented (possibly across lines, for multiline text input).
* Scrolling of the text field has to be implemented (horizontally for long lines, vertically for multiline input).
* Native features such as copy-and-paste have to be reimplemented.
* Native features such as spell-checking have to be reimplemented.
* Native features such as drag-and-drop have to be reimplemented.
* Native features such as page-wide text search have to be reimplemented.
* Native features specific to the user, for example custom text services, have to be reimplemented.
* This is close to impossible since each user might have different services installed, and there
is an unbounded set of possible such services.
* Bidirectional text editing has to be reimplemented.
* For multiline text editing, line wrapping has to be implemented for all relevant languages.
* Text selection has to be reimplemented.
* Dragging of bidirectional text selections has to be reimplemented.
* Platform-native keyboard shortcuts have to be reimplemented.
* Platform-native input method editors (IMEs) have to be reimplemented.
* Undo and redo functionality has to be reimplemented.
* Accessibility features such as magnification following the caret or selection have to be reimplemented.
- forgotusername 15y ago> the cloud port will be powered by the existing LibreOffice code. The application will run on a server and its user interface will be painted in the user's browser window on an HTML Canvas element. The LibreOffice cloud prototype is powered by Broadway, an impressive HTML-rendering backend for the Gtk+ widget toolkit. So basically for the cost of leveraging an existing library (Broadway), you get LibreOffice in places you wouldn't previously, and it's much better than the alternatives (rewrite LibreOffice from the ground up, or have no mobile solution at all). Sure it's not perfect, but practicality > correctness.
- SoftwareMaven 15y agoHow many of those are already implemented in LibreOffice, though, and just need a new drawing mechanism. Building an office suite from scratch is far different from changing its rendering engine.
- starwed 15y agoBespin didn't choose Canvas on a whim. IIRC they initially prototyped with divs and found that performance simply wasn't good enough. Since then browsers implementations have advanced such that this is no longer so -- it didn't make the initial choice necessarily bad.