I suggest add option to use external tool as text filter.
1) Pass all / selected text to the stdin of external tool, capture the stdout of external tool, and replace all / selected text with it.
2) Copy all text to a temp file, process the temp file with external tool, and replace all text with content of the temp file.
EmE is unable to undo change if I process the current file directly with external tool, isn’t it?
Thanks for your comments.
(1) I don’t know if you noticed, but you could use $(CurText) in the Arguments field in External Tools Properties.
(2) Thanks for input!
If you process current file, and reload with EmEditor, it will not be able to undo it.