Comment
Comment by marcellus23
have you considered using Services for this? Services already support taking selected text and doing transformations on it, and allow user-configurable keyboard shortcuts. Plus it will work in any app, not just Notes.