diff --git a/lms/static/coffee/src/customwmd.coffee b/lms/static/coffee/src/customwmd.coffee index e8012d8f42..8a3a2d7c97 100644 --- a/lms/static/coffee/src/customwmd.coffee +++ b/lms/static/coffee/src/customwmd.coffee @@ -109,7 +109,18 @@ $ -> converter.hooks.chain "postConversion", processor.replaceMath converter - Markdown.makeWmdEditor = (appended_id) -> + Markdown.makeWmdEditor = (elem, appended_id) -> + $elem = $(elem) + if not $elem.length + console.log "warning: elem for makeWmdEditor doesn't exist" + return + if not $elem.find(".wmd-panel").length + _append = appended_id || "" + $wmdPanel = $("
").addClass("wmd-panel") + .append($("
").attr("id", "wmd-button-bar#{_append}")) + .append($(" +
+
New Post -
-
- -
-
+
% for thread in threads: diff --git a/lms/templates/discussion/thread.html b/lms/templates/discussion/thread.html index 5997b1b70c..52eb17c107 100644 --- a/lms/templates/discussion/thread.html +++ b/lms/templates/discussion/thread.html @@ -41,14 +41,17 @@ % for comment in comments:
- ${render_vote(comment)} -
-
- ${comment['body']} -
- ${render_info(comment)} - ${render_reply()} - ${render_edit()} +
+ ${render_vote(comment)} +
+
+ ${comment['body']} +
+ ${render_info(comment)} + ${render_reply()} + ${render_edit()} +
+