Add a "prettify" function to the custom widget editor

Title says it all. Would be nice to have an option to prettify code in the widget editor. Right now I am copy & pasting over to VS Code to get this done…