Aaron Greenlee

Tagged in

notes

🚀

Research and Notes for Building a Collaborative, Rich Text Editor for Un/Structured Text

This document organizes notes, sources, and other explorations in the pursuit of building a web-based text editor. My use cases do not seem to be typical. If you seek a rich text editor or a syntax editor, there are many great packages ready for you to integrate or build on. Criteria Must Have WYSIWYG Rich Text Data model supportive of lexing and parsing structured text Apply updates to multiple nodes in a single transaction (e....

How to determine if the key pressed is printable using a web browser's keyboard event such as onKeyDown and the `event.key` property

Background There once was a time when you might bind a function to a onKeyDown event and quickly ignore a range of inputs by using the event.keyCode property. For example, you could check the value of event.keyCode and determine that you can ignore the key press event because the value was less than 29. Numbers made it easy. The code for the spacebar key was 32 and then the next range of printable characters you might care about started at 48 and went up to 90 and so on....