title: How to call .getContent and .parseContent from bootstrap-markdown.js
body: <p>I'm a newbie when it comes to using Bootstrap plugins (just learned about it via <a href="http://www.codecademy.com/en/skills/make-an-interactive-website/" rel="noreferrer">codecademy</a>)... I really would like to use this awesome <a href="https://github.com/toopay/bootstrap-markdown" rel="noreferrer">bootstrap markdown plugin</a> but fail to properly install it so I can call the getContent and parseContent from the <code>textarea</code>.</p>
  <p>If you could help me I would really appreciate it it - a lot!</p>
  <p>I have done this so far (mocking up the example from codecademy)</p>
  <h3>What I want:</h3>
  <p><img src="https://i.stack.imgur.com/Z8PCJ.png" alt="end goal" /></p>
  <h2>What I did so far</h2>
  <p>Downloaded the following libs (<code>jquery</code>, <code>bootstrap</code>, <code>bootstrap-markdown</code>, <code>to-bootstrap</code>, <code>markdown</code>) via bower and copied the these files into the <code>js/vendor</code> folder</p>
  <ul>
  <li><code>jquery.js</code> (v2.1.1)</li>
  <li><code>bootstrap.js</code> (v3.1.1)</li>
  <li><code>bootstrap-markdown.js</code> (v2.5.0)</li>
  <li><code>he.js</code> (v0.4.1)</li>
  <li><code>to-markdown.js</code> (no version number)</li>
  <li><code>markdown.js</code> (no version number)</li>
  </ul>
  <h3>index.html</h3>
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;link href=&quot;css/bootstrap.css&quot; rel=&quot;stylesheet&quot;&gt;        
      &lt;link href=&quot;css/bootstrap-markdown.min.css&quot; rel=&quot;stylesheet&quot;&gt;    
      
      &lt;link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'&gt;
      &lt;link href=&quot;css/style.css&quot; rel=&quot;stylesheet&quot;&gt;
      
      &lt;script src=&quot;js/vendor/jquery.js&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;js/vendor/bootstrap.js&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;js/vendor/markdown.js&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;js/vendor/bootstrap-markdown.js&quot;&gt;&lt;/script&gt;     
      &lt;script src=&quot;js/vendor/he.js&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;js/vendor/to-markdown.js&quot;&gt;&lt;/script&gt;
      
         
      
    &lt;/head&gt;
    
    &lt;body&gt;
      
      &lt;div class=&quot;container&quot;&gt;
          
        &lt;form&gt;   
              &lt;textarea name=&quot;content&quot; data-provide=&quot;markdown-editable&quot; rows=&quot;2&quot; class=&quot;status-box md-input&quot;_&gt;### Hello World
  *This*  **is** the ***ultimate test***.
              &lt;/textarea&gt;
  
        &lt;/form&gt;
        
        &lt;div class=&quot;button-group pull-right&quot;&gt;
          &lt;p class=&quot;counter&quot;&gt;140&lt;/p&gt;
          &lt;a href=&quot;#&quot; class=&quot;btn btn-primary btn-post&quot;&gt;Post&lt;/a&gt;
        &lt;/div&gt;
      
        &lt;ul class='rows'&gt;
          &lt;ul class=&quot;posts list-inline&quot;&gt;
          &lt;/ul&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
      
      &lt;script src=&quot;js/vendor/showdown.js&quot;&gt;&lt;/script&gt;
      &lt;script type='text/javascript' src=&quot;js/app.js&quot;&gt;&lt;/script&gt;
    &lt;/body&gt;
    
  &lt;/html&gt;
  </code></pre>
  <p>I actually think that this install the plugin correctly (my initial thought was that I didn't install the plugin correct which was why I couldn't make it work).</p>
  <p>But how do I get the content from the textarea via the <code>bootstrap-markdown</code> API's <code>.getContent()</code> and <code>.parseContent()</code> instead of having to use the <code>.getVal()</code> and convert the string to html via <code>showdown</code>?</p>
  <p>So far I can get it this way</p>
  <h3>app.js</h3>
  <pre><code>$(&quot;.status-box&quot;).markdown({
    savable:true,
    
    onSave: function(e) {
      $('&lt;li class=&quot;col-xs-6 pull-left raw-markdown&quot;&gt;').append( e.getContent() ).prependTo('.posts');     
      $('&lt;li class=&quot;col-xs-6 pull-right end-markdown&quot;&gt;').append( e.parseContent() ).prependTo('.posts');
    }
  });
  </code></pre>
  <p><img src="https://i.stack.imgur.com/oH6KM.png" alt="Currents" /></p>
  <p>Which is good. But I want to be able to access via the Post button instead.</p>
  <p>I tried without luck:</p>
  <pre><code>var post;
  $(&quot;.status-box&quot;).markdown( post = e.getContent() );
  </code></pre>