added autoformatting for outputted content in preview window