Fix and improve wysiwyg editor

Fix for #214