The args.newText value is read-only and you can change the text by canceling the default event and submitting the adjusted value:
dp.onEventEdit = function(args) {
args.preventDefault();
args.e.data.text = args.newText + " modified";
dp.events.update(args.e);
};
Since version 2020.4.4730 the args.newText can be modified directly:
dp.onEventEdit = function(args) {
args.newText = args.newText + " modified";
};
Please note that both approaches only work in onEventEdit. The onEventEdited method is fired after the default action.