Bugfix: when onSaveTransforms are present, must save the transformed text, not the original text.