Skip to content

Commit 182693e

Browse files
committed
Indicate that preview is being updated
1 parent 249a676 commit 182693e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

martor/static/martor/css/martor.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ form .martor-preview {
225225
background: #F9F9F9;
226226
}
227227

228+
form .martor-preview-stale {
229+
background: repeating-linear-gradient(-45deg, #fff, #fff 10px, #f8f8f8 10px, #f8f8f8 20px) !important;
230+
}
231+
228232
.icon.expand-editor {
229233
position: absolute;
230234
bottom: .8em;

martor/static/martor/css/martor.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

martor/static/martor/js/martor.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
var form = new FormData();
151151
form.append('content', value);
152152
form.append('csrfmiddlewaretoken', getCookie('csrftoken'));
153+
currentTab.addClass('martor-preview-stale');
153154

154155
$.ajax({
155156
url: textareaId.data('markdownfy-url'),
@@ -159,7 +160,7 @@
159160
contentType: false,
160161
success: function(response) {
161162
if(response){
162-
currentTab.html(response);
163+
currentTab.html(response).removeClass('martor-preview-stale');
163164
$('pre').each(function(i, block){
164165
hljs.highlightBlock(block);
165166
});

0 commit comments

Comments
 (0)