ezsystems/ezoe — pull request #31 by dpobel (2012-08-06 14:35:05+00:00)
Title: Fixed #19537: embedded objects no longer display name

Bug: http://issues.ez.no/19537

Description
===========
To work with ezautosave, as of Online Editor 5.5, the text inside the WYSIWYG editor is synchronised with the underlying textarea more often (for instance when a line is added or when Online Editor looses the focus) and not only when the end user submits the edit form. As a result, the cleanup code of the embed elements markup is executed even if the end user is still using the Online Editor or the edit form.

This patch changes the cleanup code to be executed only when its content is put in the underlying textarea so that the changes are not visible by the end user.

Testing
=======
Manual tests with IE8, Chrome and Firefox with the test cases of http://issues.ez.no/18264 (since the cleanup code was changed for this issue)