title: Save formatted text to database and retrieve it back 'as is' like a formatted string
body: <p>I am embedding tinymce [http://www.tinymce.com/] in twitter bootstrap form , so that user can input formatted text which I can persist to a postgres database. </p>
  
  <p>The problem I am facing is that I get plain text on submit of the form. Can someone help me get the formatted text as a string that I can persist and echo to the html page . </p>
  
  <p>Here is my code [Note:It uses HAML]</p>
  
  <pre><code>%html{:lang =&gt; "en"}
    %head
      %meta{:charset =&gt; "utf-8"}
          %link{:href =&gt; "//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css", :rel =&gt; "stylesheet"}
      %script{:src =&gt; "//tinymce.cachefly.net/4.0/tinymce.min.js"}
      :javascript
        tinymce.init({selector:'textarea_format'});
  %body
    .container
      %legend Post a New Job
      .well
        %form#signup.form-horizontal{:action =&gt; "submit", :method =&gt; "post"}
          %legend
          .control-group
            %label.control-label Title
            .controls
              .input-prepend
                %span.add-on
                  %i.icon-user
                %input#title.input-xxlarge{:name =&gt; "title", :placeholder =&gt; "Title", :type =&gt; "text"}/
          .control-group
            %label.control-label Description Formatted
            .controls
              .input-prepend
                -#%span.add-on
                  -#%i.icon-user
                %textarea_format#message.input-xlarge.span6{:name =&gt; "message_formatted", :rows =&gt; "10"}
          .control-group
            %label.control-label
            .controls
              %button.btn.btn-success{:type =&gt; "submit"} Submit 
  </code></pre>
  
  <p>Seems like I can use tinyMCE.get('content id').getContent() but I am not sure how ?</p>
  
  <p>I am very new to java-script . Can someone please post the required code change and some explanation. </p>
  
  <p>Thanks</p>