fixes #4982 ACE editor is not saving data

Fixed the Issue and pushed the code for review, please check it.