HTML <style>, <script> formatting:
Use a simple textarea for code input?
Source Code from http://jsbeautifier.org/
The source code for the latest version is always available on Einar Lielmanis site, jsbeautifier.org.
As the beautifier is — and always will be — completely free and open, donating is a wonderful thing to do and it will probably make you feel good and warm inside.