Added a WYSIWYG editor, moved out the form generation.

Fixed a problem with the image uploading