Aloha Editor–simple and easy to use HTML5 WYSIWYG editor
Join the DZone community and get the full member experience.
Join For Freesome sites need a simple wysiwyg editor just to provide some simple formatting options for some texts. i needed an editor like this on one of my asp.net mvc projects. although there are a lot of editors and it is not hard to build your own simple editor i took aloha editor . let’s see why.
if you go to aloha editor homepage you will find working example of editor and example html page with javascript that works as simple getting started guide. it took me couple of minutes to add aloha editor to my page and get it working.
configure on page, use from cdn
you can include aloha editor files from their cdn and configure editor on your page. this is the block of javascript from my page:
<!-- load the aloha editor core and some plugins --> <script src="http://cdn.aloha-editor.org/latest/lib/aloha.js" data-aloha-plugins="common/ui, common/format, common/list, common/link, common/table, common/highlighteditables"> </script>
notice how easy it is to say what functions you want to plug to editor. i mean even beginners should be able to get this editor work with no markable problems.
visible only when needed
here is one text field where simple html editing is needed:
when i move mouse to text area to start editing text then aloha toolbar appears:
toolbar is lightweight and doesn’t take space on screen when it is not needed. toolbar like this leaves way more space for content on screen and it allows to focus better on information on form.
conclusion
aloha editor is small, compact and easy to use. it may save a remarkable amount of space on views where more than one wysiwyg editor is needed. files can be included from aloha cdn and this way it possible to save some traffic and keep load of server lower. javascript you must add to your pages is short, simple and easy to understand. alhtough i have been aloha user for some hours i am very happy with it.
Published at DZone with permission of Gunnar Peipman, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments