How to update block attribute after format is applied?

How to update block attribute after format is applied?