Commits

Benoît Allard committed b4619fb

Add markdown formatting, toggle the editpane together with the rest

Comments (0)

Files changed (3)

 autopublish
 coffeescript
 less
+showdown
 
       $('#content', edit).val(this.content)
 
-      edit.toggle('slow')
-      text.toggle('slow')
+      text.hide() # Don't know why, but I need to do this separatly
       $('.edittoggle', msg).toggle()
     "click #save": ->
-      console.log "save"
       edit = $('#edit'+this._id+' #content')
       msg = $('#'+this._id)
       text = $('#content #text', msg)
       Messages.update({_id: this._id},{$set: {content: edit.val(), last_modified_on: Date.now()}})
-      edit.toggle('slow')
-      text.toggle('slow')
+      text.show() # idem, see above
       $('.edittoggle', msg).toggle()
 
   Meteor.startup ->
   {{> login}}
   {{> new}}
   <div class="content">
-  <div style="display:none" id="editpane">
+  <div style="display:none" id="editpane" class="edittoggle">
     <textarea rows=10 id="content"></textarea>
   </div>
   <div class="block">
       *</span>
     {{/if}}
     </p>
-    <div id="content"><span id="text">{{ content }}</span></div>
+    <div id="content"><span id="text">{{#markdown}}{{ content }}{{/markdown}}</span></div>
     {{#if loggedonuser }}
     <nav><ul>
       {{#if archived }}