Fixed a bug causing text from editor to be lost in AJAX call