Hacked together to get the code editor working.