fix #23030 : Missing action buttons in TextEditor

Is now able to cancel editing. And closing TextEditor
with X clears any modifications, which is most intuitive.
Merge pull request #1159 from Soerboe/23030_Missing.action.buttons.on.TextEditor

fix #23030 : Missing action buttons in TextEditor