Skip to content

August 6, 2012

SimpleHtml5Editor – Just edit, no bullshit

During the development of the experimental branch in GrassCMS I found out that there are no bullshit-free wisywig html editors out there, as you might imagine, I just wanted a wisywig editor, as small as possible, to fucking edit text. Nothing more, just fucking edit text.

Turns out that If you look for minimalist wisywig editors you’ll get featureless and yet still huge stuffs, bloated with polyfils and fixes for older browsers. It’s almost inconceivable that a “light” editor weights more than 200k, a text editor, something as simple as that, and one, as I wanted it, to actually edit text, with only the stuff you’ll need!

You’d think that’s logical, hey, they’ve got to support older browsers don’t they? Well, I’ll tell you a secret:

Older browsers suck

I didn’t want to support older browsers from the begging, neither do you, or you’ll probably won’t be reading this, so, why did I have to use those extra hundreds of kilobytes?

I could not stop myself, I needed a wisywig editor so, why not doing one myself? And there It begun, I soon started a html5 wisywig editor, using contentEditable and document.execCommand, then I stablished four goals to the project:

  • Be pure html5
  • Not use jquery
  • less than 100 lines of coffescript
  • Nice, usable and featureful
So, In a few days I had it, an editor using the contentEditable and execCommand html5 features, built it as a  zeptojs plugin (a nice alternative to jquery that is like ten times smaller) and with almost all the stuff you need for text editing and all in less than 90 lines of coffescript

Check it out!

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments