Properly detect WYSIWYG editor, handle client disconnects, remove debug logging