From 1cc31c9ac4338bd740eb5c5699b3c3bb681a2092 Mon Sep 17 00:00:00 2001 From: Gustavo Date: Fri, 6 Oct 2017 06:56:39 -0300 Subject: [PATCH] Fix'd comment mark bug --- mural/templates/mural/_form_comment.html | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) mode change 100644 => 100755 mural/templates/mural/_form_comment.html diff --git a/mural/templates/mural/_form_comment.html b/mural/templates/mural/_form_comment.html old mode 100644 new mode 100755 index bac36e8..cb96256 --- a/mural/templates/mural/_form_comment.html +++ b/mural/templates/mural/_form_comment.html @@ -8,7 +8,7 @@ {% csrf_token %}
- {% render_field form.comment class='form-control text_simple_wysiwyg' %} + {% render_field form.comment class='form-control text_simple_wysiwyg' id='main_comment'%} {{ form.post.help_text }} @@ -128,17 +128,23 @@ var node = document.createElement('span'), value = field.val(); + var paragraph = document.querySelector("#comment-form > div:nth-child(2) > div > div.note-editing-area > div.note-editable.panel-body > p") + $(node).addClass('marked_user'); $(node).html(value); - context.invoke('restoreRange'); context.invoke('pasteHTML', node); - + $('#comment-form > div:nth-child(2) > div > div.note-editing-area > div.note-editable.panel-body > p > br').remove(); + paragraph.innerHTML += ' ' + //paragraph.focus(); + //paragraph.caretTo(paragraph.length); $(modal).modal('hide'); + //  }); } }); + return button.render(); // return button as jquery object } @@ -152,6 +158,7 @@ ['style', ['bold', 'italic']], ['insert', ['link']], ['mybuttons', ['addUser']], + ['color', ['color']], ], buttons: { addUser: AddUserBtn -- libgit2 0.21.2