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 .= '}); '; }