From 962b21e04e1f69039003cfa4f08d18ee1df500b6 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 2 Feb 2018 16:49:46 -0600 Subject: more bug fixes --- design/templates/admin/insert_images.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'design/templates') diff --git a/design/templates/admin/insert_images.html b/design/templates/admin/insert_images.html index 192feb9..8f393b1 100644 --- a/design/templates/admin/insert_images.html +++ b/design/templates/admin/insert_images.html @@ -95,7 +95,7 @@ Array.from(document.getElementsByClassName('insert')).forEach(function(item) { } else { var code = buildImage(item.dataset.src, item.dataset.id, item.dataset.class, item.dataset.caption); } - item.addEventListener("click", function( event ) { + item.addEventListener("click", function(event) { var el = parent.document.getElementById('{{textarea_id}}'); var start = el.selectionStart; var end = el.selectionEnd; @@ -103,7 +103,6 @@ Array.from(document.getElementsByClassName('insert')).forEach(function(item) { var before = text.substring(0, start); var after = text.substring(end, text.length); el.value = (before + code + after); - console.log(code); el.selectionStart = el.selectionEnd = start + code.length; el.focus(); return false; -- cgit v1.2.3-70-g09d2