This is an applet that allows you to design chemical structures in a WYSIWYG editor. The editor supports undo/redo, importing and exporting of diagrams and it can be controlled by JavaScript. I know nothing about chemistry, but the diagrams look convincing to me :-)
http://metamolecular.com/chemwriter/