code: function showMessage(editor, msg) {
          if (editor && editor.showMessage) {
              editor.annotate({line: 1, message: msg})
          }
      }
docs: function generateTemplateSource(html, editor, name) { var code = null; try { code = window.reactTemplates.convertTemplateToReact(html.trim().replace(/\r/g, ''), {modules: 'none', name: name}); clearMessage(editor); } catch (e) { if (e.name === 'RTCodeError') { //index: -1 line: -1 message: "Document should have a root element" name: "RTCodeError" editor.annotate({line: e.line, message: e.message, index: e.index}); } else { editor.annotate({line: 1, message: e.message}); } //showMessage(editor, msg); console.log(e); } return code; }