Browse Source

Clear previous error message on markdown preview

merge-requests/114/head
Andrew Shu 4 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