       </div>
       <div className="row">
         <div className="small-12 column">
-          <PageContent ref="content" onContentChange={@handlePageSubmit} content=@state.content />
+          <PageContent ref="content" onContentChange={@handleContentChange} content=@state.content />
         </div>
       </div>
     </div>


App = React.createClass
  getInitialState: ->
    title = @props.title
    content = @props.content
    {
      title: title
      content: content
    }
  submitPage: ->
    path = if this.props.pageId? then "/pages/#{this.props.pageId}" else "/pages/"

      .put(path)
      .send({name: @state.title, content: @state.content})
      .end((err, res) -> debug('%s %s', err, res))
  handleContentChange: (html) ->
    ce = $("<pre />").html(html)
    if($.browser.webkit)
      ce.find("div").replaceWith(()-> return "\n" + this.innerHTML)
