Added 'Format code' feature for RAW data editor.

Code in the raw editor auto-format on mode select change (depending on the mode type). Additionally ive added 'Format code' button that gives the ability to format code at any time.