rewrite version of editor from code_blocks