Create custom blocks

I would like to be able to make some custom blocks that the client can just drag and drop into an email. For instance a header block with their logo and company name, a footer block with their contact details, etc.


I imagine that this would require writing some code, which is fine. Ideally, this should be made as easy as possible so that developers can create their own custom blocks. It would be helpful to have some clear documentation on how to do this.