I've just had a dabble at implementing text alignment for our implementation of trix. I've managed to make a shim to give the same functionality.The idea is roughly the same, blockAttributes can have a className option. However, I realised that we'd only want one alignment attribute per block which is where I implemented a role option that will remove any other role matching attributes before adding a new one.
Note: This is a proof-of-concept shim. We'll want to fork and implement this properly.