         }, [
           $ 'textarea', {
             ref:'editor'
-            onChange: @contentUpdateFromMarkdown
+            onChange: @onChangeTextarea
             style: {height: '100%', width: '100%', border: 0, outline: 0, fontSize: '14px', padding: '5px', overflow: 'auto', fontFamily:'Consolas, Menlo, monospace', resize: 'none', background: 'transparent'}
             value: @state.markdown
           }

          # 触っているところより前が書き換わると維持されないという…
          () =>
            editor.setSelectionRange(caretStart, caretEnd)
          @contentUpdateFromMarkdown
    @syncMarkdownFromServer()

  sendMarkdown: (markdown)->

$ = React.createElement

Editor = React.createClass
  contentUpdateFromMarkdown: (markdown)->
    @setState
      markdown: markdown
    try
      content = md2react markdown,
        gfm: true
        breaks: true
        tables: true
