Aloha Editor - HTML5 WYSIWYG Editor
aloha-editor.org
aloha-editor.org
In trying the demos, it behaved rather unobtrusively and flexibly, and despite looking a little like Word's contextual ribbon it didn't make me want to set anything on fire after a few minutes. That's a first for an in-browser rich text editor.
I think it's interesting that "old" rich text editors like TinyMCE/FCKEditor tried to copy Word 2003 right down to the massive toolbars, and then barely anybody needed all that crud so it fell out of fashion in newer, slim designs (e.g., StackOverflow, Quora). Nowadays, it appears that Word 2007/2010 has finally gotten enough mindshare for the ribbon/contextual palette model that it's finally being comfortably re-implemented as a web UI widget.
One thing I wonder, though, is why WYSIWYG editors still use explicit markup (bold, italic, font size) instead of allowing the definition of styles. This is a hassle if you want to write consistent documents.
Even Google Documents does this; it does not have custom named styles like Word. It only has named styles for header 1..6, but usually that's not enough.
".mahalo()" which is the destroy method is non-functional in the current release, even though it in the documentation. Artifacts from pasting and x-browser is a bitch too. It looks promising, but it ain't ready for primetime, and don't expect get much support either.
It is a great idea and I see where they're going but it ain't there yet.
http://stackoverflow.com/questions/3553041/how-can-you-catch...
The onpaste event isn't supported across the board, and doesn't let you access the paste content in any way.
Just try copying a webpage and posting it into the Aloha Editor area- it will paste the entire dom. Blech. contentEditable should be a boon for web devs, but instead the idea of a writable web has stagnated on a buggy, inconsistent implementation of contentEditable.
I'm looking forward to the next iteration of editable html content!
That and the way every browser reacts to the enter key press. Firefox appends <BR>, Chrome appends <Div> and IE[3] appends <P>.
[1] I don't know where I read about this. Sorry.
[3] The IE behavior is similar to MS Word.
It's really tricky to handle right, and the Paste plugin for Tiny has to use a lot of tricks to do it properly. The onpaste event doesn't really work for this, because even in browsers that supports it, it just gives you plain text with no formatting. Same with a hidden textarea.
It's ok if you want to strip all styles, and then let your user go though and apply all the same styles from his Word document manually once again (frustrating!), but otherwise it wont cut it.
The paste plugin does a lot of browser specific stuff, but basically handles it by creating a contenteditable div and redirecting the paste event into that, then grabbing the horribly broken HTML browsers produce when pasting from anything and cleaning it off before moving it back to the place the user pasted too...
Then with some string functions I managed to break each node down into text runs (just wrapping spans around text blocks) so that I could apply styles to certain segments. Preserved the whole document in valid XHTML.
Just food for thought if you feel like making the editing functions even more granular.
But it is looking nice! Inline editing is very useful!
It uses a duel licensing (AGPLv3 / Commercial) setup. How AGPLv3 applies to web applications is a significant grey area, and could imply an expectation that all javascript code of the application needs be AGPL also.
Answers in the forum are vague and no clear indication has been given to when a commercial license is is not required.
TL;DR: Want to use this in a web app? Pay for a commercial license or consult a lawyer
In closer inspection, the image gets transformed to a base64 encoding (data:image/gif;base64,[...]) which is useless in this context.
Also, they're still working at the image plugin, so I think it will be improved.
http://aloha-editor.org/wiki http://aloha-editor.org/wiki/Browser_Support
Not supporting wysywig is a tactical advantage in my book.
I've gone the markdown route in the past, but recently also put a WYSIWYG editor in a project. The client was insanely happy that he and his employees didn't have to deal with teaching/learning markdown and converting Word documents to markdown anymore. Pasting just worked.
- Undo doesn't work for style changes
- Selecting text and changing to heading still changes the entire paragraph to heading
@2 Actually right now this is the default behavior. Converting bolck elements (h1-h6, pre, p) always changes the whole block and does not split the selection. This could be changed in future.
Really Opera, a modern html5 compatible browser "is not supported"?