Commit bac168bb authored by Andrew Shu's avatar Andrew Shu

Clear previous error message on markdown preview

parent a9d312d1
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment