Skip to content

Commit

Permalink
fix bug w updating preview text
Browse files Browse the repository at this point in the history
  • Loading branch information
TangentFoxy committed Jan 6, 2018
1 parent 006106e commit c43cb5b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions static/js/posts/edit.js
Expand Up @@ -87,7 +87,7 @@ $(function() {
}
});

simplemde.codemirror.on('change', function() {
updateGeneratedHTML = function() {
preview_text.placeholder = simplemde.value().substring(0, 500);
_html.val(marked(simplemde.value()));

Expand All @@ -96,7 +96,10 @@ $(function() {
} else {
preview_html.val(marked(preview_text.placeholder));
}
});
};

simplemde.codemirror.on('change', updateGeneratedHTML);
$("#preview_text").on("change", updateGeneratedHTML);

var ptype = $('#type');
var status = $('#status');
Expand Down

0 comments on commit c43cb5b

Please sign in to comment.