WYIWYG Editor in pure JavaScript