diff --git a/app/static/css/editor.css b/app/static/css/editor.css
index 17a2f8e..9f48062 100644
--- a/app/static/css/editor.css
+++ b/app/static/css/editor.css
@@ -43,9 +43,10 @@
min-height: 15rem;
}
.editor #editor_content_preview {
- margin: 5px;
+ padding: 5px;
margin-top: 10px;
border: var(--border);
+ background-color: rgba(0,0,0,0.2);
}
.editor .modal {
position: absolute;
diff --git a/app/static/less/editor.less b/app/static/less/editor.less
index 8ef98f5..774b91b 100644
--- a/app/static/less/editor.less
+++ b/app/static/less/editor.less
@@ -55,9 +55,10 @@
}
#editor_content_preview {
- margin: 5px;
+ padding: 5px;
margin-top: 10px;
border: var(--border);
+ background-color: rgba(0, 0, 0, 0.2);
}
.modal {
diff --git a/app/static/scripts/editor.js b/app/static/scripts/editor.js
index 6ad3524..caaddd3 100644
--- a/app/static/scripts/editor.js
+++ b/app/static/scripts/editor.js
@@ -61,6 +61,8 @@ function editor_insert_around(event)
else {
ta.selectionStart = ta.selectionEnd = start + before.length;
}
+
+ preview();
}
/* Event handler that modifies each line within the selection through a
@@ -94,6 +96,8 @@ function editor_act_on_lines(event, fn)
ta.selectionStart = start;
ta.selectionEnd = end;
+
+ preview();
}
function editor_clear_modals(event, close = true) {
@@ -135,6 +139,8 @@ function editor_insert_link(event, link_id, text_id, image = false)
else {
ta.selectionStart = ta.selectionEnd = start + 1;
}
+
+ preview();
}
function editor_set_title(event, level, diff)
@@ -241,7 +247,7 @@ ta.addEventListener('keydown', function(e) {
if (previewTimeout != null) {
clearTimeout(previewTimeout);
}
- previewTimeout = setTimeout(preview, 1000);
+ previewTimeout = setTimeout(preview, 3000);
});
diff --git a/app/templates/widgets/editor.html b/app/templates/widgets/editor.html
index 010e4ba..2f25b94 100644
--- a/app/templates/widgets/editor.html
+++ b/app/templates/widgets/editor.html
@@ -90,8 +90,9 @@
-