Browse Source

Clear previous error message on markdown preview

merge-requests/110/merge
Andrew Shu 5 years ago
parent
commit
bac168bb08
  1. 4
      tildes/static/js/behaviors/markdown-preview-tab.js

4
tildes/static/js/behaviors/markdown-preview-tab.js

@ -9,9 +9,13 @@ $.onmount("[data-js-markdown-preview-tab]", function() {
var $previewDiv = $(this)
.closest("form")
.find(".form-markdown-preview");
var $previewErrors = $(this)
.closest("form")
.find(".text-status-message.text-error");
$editTextarea.addClass("d-none");
$previewDiv.removeClass("d-none");
$previewErrors.remove();
});
$(this).on("after.success.ic success.ic", function(event) {

Loading…
Cancel
Save