aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/blog_admin/edit_post.html8
-rw-r--r--templates/blog_admin/new_post.html8
2 files changed, 10 insertions, 6 deletions
diff --git a/templates/blog_admin/edit_post.html b/templates/blog_admin/edit_post.html
index 09bba62c..c221917d 100644
--- a/templates/blog_admin/edit_post.html
+++ b/templates/blog_admin/edit_post.html
@@ -125,7 +125,7 @@
static create(value) {
const node = super.create(value);
if (typeof value === "string") {
- node.innerHTML = "" + this.tex2svg(value) + "";
+ node.innerHTML = "" + this.tex2svg(value) + "";
node.contentEditable = "false";
node.setAttribute("data-value", value);
}
@@ -152,7 +152,7 @@
static create(value) {
const node = super.create(value);
if (typeof value === "string") {
- node.innerHTML = "" + this.tex2svg(value) + "";
+ node.innerHTML = "" + this.tex2svg(value) + "";
node.contentEditable = "false";
node.setAttribute("data-value", value);
}
@@ -244,7 +244,9 @@
});
try {
- const delta = quill.clipboard.convert(document.getElementById("body").value);
+ const value = document.getElementById("body").value;
+ const newValue = value.replace(/<p><br><\/p>/g, "");
+ const delta = quill.clipboard.convert(value);
quill.setContents(delta, "silent");
} catch (e) {
console.log(e);
diff --git a/templates/blog_admin/new_post.html b/templates/blog_admin/new_post.html
index 8d05d7b9..807d9d9a 100644
--- a/templates/blog_admin/new_post.html
+++ b/templates/blog_admin/new_post.html
@@ -125,7 +125,7 @@
static create(value) {
const node = super.create(value);
if (typeof value === "string") {
- node.innerHTML = "&#65279;" + this.tex2svg(value) + "&#65279;";
+ node.innerHTML = "" + this.tex2svg(value) + "";
node.contentEditable = "false";
node.setAttribute("data-value", value);
}
@@ -152,7 +152,7 @@
static create(value) {
const node = super.create(value);
if (typeof value === "string") {
- node.innerHTML = "&#65279;" + this.tex2svg(value) + "&#65279;";
+ node.innerHTML = "" + this.tex2svg(value) + "";
node.contentEditable = "false";
node.setAttribute("data-value", value);
}
@@ -244,7 +244,9 @@
});
try {
- const delta = quill.clipboard.convert(document.getElementById("body").value);
+ const value = document.getElementById("body").value;
+ const newValue = value.replace(/<p><br><\/p>/g, "");
+ const delta = quill.clipboard.convert(value);
quill.setContents(delta, "silent");
} catch (e) {
console.log(e);