Skip to content
Snippets Groups Projects
Commit a423c0e1 authored by Chris Lawton's avatar Chris Lawton
Browse files

update data-comment with markdown, not the markup

parent e9bf50da
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,8 @@
const commentContainer = $(this).closest(editBlock).siblings(comment);
const id = $(commentContainer).attr('data-id');
const editedComment = $(this).closest(pageDown).find('.wmd-preview').html();
const commentMD = $(this).closest(editBlock).find('textarea').val();
$(commentContainer).attr('data-comment', commentMD);
// TODO - get correct URL
const url = `${window.location.origin}/apply/api/comments/${id}/edit/`;
......@@ -105,7 +107,8 @@
};
const updateComment = (el, id, newComment) => {
$(el).html(newComment).data('comment', newComment).data('id', id);
$(el).attr('data-id', id);
$(el).html(newComment);
};
const closeAllEditors = () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment