projects | blog


[all the things] [rss]

June 14, 2015 5:18 PM

Text Editor

It's been really hot and humid lately. I feel like I can't think straight. I might just go and buy an air conditioner. It costs $120 extra to be able to use it, but I feel like my comfort is worth it.

I was able to create a new little project this weekend. It's a web text editor, and I just so happen to be typing in it right now. I realized in order to make any sort of text editor all you need to do is make an element contenteditable and it just works! (As long as you're on a modern browser)

I added a little feature that allows me to change colors of the text. And I can even add more colors than the ones already listed on the page. Of course, while making this I thought of a whole bunch of other things that I could add to this editor. I was thinking of having a way to preview color changes. I tried implementing that, but it turned out to be more complicated than I expected.

The editor is also just a static page, and I still haven't gotten my development and production sites using different static pages and templates, so for now, all changes are live.

2021 Update: This project was the precursor to my ascii art color-izer, and I don't think I'll ever publish it again. I used a completely different strategy for generating the html for the colored text which used a lot of crazy html element node manipulation. It sort of worked, but I don't think it generated good html (I had spans inside of spans, which I didn't like). The version I have now that just stores everything in 2d arrays is a lot simpler and works better.

I don't understand how I didn't have a development environment before, but I definitely have one now.


<< More Recent