setup preview frame for codemirror