Use div tag instead of pre for Text output. When code editor is hide, let form keep showen