Can a plugin expose a method to be called during editor initialization?

I want to create a placeholder plugin that stores, during its initialization, the empty document. How could I do it?

A state field is initialized with its init method, so if this is just about state that would be useful. Otherwise, a plugin view could be what you want.