Typical WYSIWYG editors, hacky way of solving this