Would someone kindly post a simple script of how that can be achieved? That'd be much appreciated!
in my projects, we were often discussing this requirement. The risk is that the user will set the category Heading, save the node then, and then the text format and any other formating, like Tables, Images, Allignment, Coloring will be removed.
Therefore, my last customer decided to go with a Java Routine with Preview option (instead of a trigger).
If you are interested, then please send me a private message with your email address.