1. Benoît Allard
  2. msgboard-meteor


Benoit Allard  committed b4619fb

Add markdown formatting, toggle the editpane together with the rest

  • Participants
  • Parent commits cc55e4d
  • Branches default

Comments (0)

Files changed (3)

File .meteor/packages

View file
  • Ignore whitespace

File msgboard.coffee

View file
  • Ignore whitespace
       $('#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 ->

File msgboard.html

View file
  • Ignore whitespace
   {{> 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 class="block">
-    <div id="content"><span id="text">{{ content }}</span></div>
+    <div id="content"><span id="text">{{#markdown}}{{ content }}{{/markdown}}</span></div>
     {{#if loggedonuser }}
       {{#if archived }}