UPDATE: v0.0.2 demo now available
Like I mentioned yesterday, I’m a big fan of the unobtrusive wiki. However, any time you start jamming a WYSIWYG editor into the middle of a page, you are no longer "see(ing) what you get".
I want a wiki where you can click anywhere and start typing, working within the page design. To that end, I’ve started work on a cross-browser WYSIWYG editor that I hope to integrate with wiki technology later on.
Reusing some text selection code, the Javascript figures out what text in a paragraph the visitor has selected with their mouse. It then highlights that area and activates keystroke capturing. When the visitor hits a key, that area is replaced with what they type. As they continue typing, new characters are appended to the area. The BACKSPACE key removes the last character in the area, and the DELETE key deletes one character to the right of the area.
This is a very early alpha, but I think it will work pretty well once I get all the key events happening (including CTRL-B for bold, etc), improve the algorithm to find out what the visitor selects (right now it gets confused if the same string appears more than once in the same paragraph), and get it caching keystrokes so you can type faster…This might take a while
Anyhow, I’d love to hear your feedback and ideas. Cheers!
November 19th, 2008
Related posts