From 061a94627fd7a994d6eee705d4342e114ba42c42 Mon Sep 17 00:00:00 2001 From: dignajar Date: Wed, 4 Nov 2015 23:54:22 -0300 Subject: [PATCH] Bug fixes, image uploader --- admin/themes/default/init.php | 2 +- plugins/simplemde/plugin.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/themes/default/init.php b/admin/themes/default/init.php index 11ec304a..07ce459e 100644 --- a/admin/themes/default/init.php +++ b/admin/themes/default/init.php @@ -159,7 +159,7 @@ class HTML { $("#jsaddImage").on("click", function() { var filename = $("#jsimageList option:selected").text(); var textareaValue = $("#jscontent").val(); - $("#jscontent").val(textareaValue + filename + "\n"); + $("#jscontent").val(textareaValue + "\"\"" + "\n"); }); $(function() diff --git a/plugins/simplemde/plugin.php b/plugins/simplemde/plugin.php index 5f40c8a4..78be158e 100644 --- a/plugins/simplemde/plugin.php +++ b/plugins/simplemde/plugin.php @@ -93,13 +93,13 @@ class pluginsimpleMDE extends Plugin { tabSize: '.$this->getDbField('tabSize').', spellChecker: false, toolbar: ['.Sanitize::htmlDecode($this->getDbField('toolbar')).'] - });'; + });'; $html .= '$("#jsaddImage").on("click", function() { var filename = $("#jsimageList option:selected" ).text(); var text = simplemde.value(); simplemde.value(text + "![alt text]("+filename+")" + "\n"); - });'; + });'; $html .= '}); '; }