message: expose command function to keep scope from iframe execution
diff: }
  }
  - export function insertText(text: string) {
  + export function command(cmd: string, value: any) {
  + switch (cmd) {
  + case "run":
  + setTimeout(() => runCodeFromEditor(), 0);
  + break;
  + case "insert":
  + setTimeout(() => {
  var doc = codeMirrorEditor.getDoc();
  var range = doc.getCursor();
  - doc.replaceRange(text, range);
  + doc.replaceRange(value, range);
  + }, 0);
  + break;
  + case "toggle":
  + setTimeout(() => toggleClass(value), 0);
  + break
  + }
  }
  //execution
  