Can my plugin be notified whenever content in the document is changed?

Not currently – your plugin can only execute whenever the user invokes it from the Plugins menu.