Bug fixes, image uploader
This commit is contained in:
parent
b667588d2e
commit
061a94627f
2 changed files with 3 additions and 3 deletions
|
@ -159,7 +159,7 @@ class HTML {
|
||||||
$("#jsaddImage").on("click", function() {
|
$("#jsaddImage").on("click", function() {
|
||||||
var filename = $("#jsimageList option:selected").text();
|
var filename = $("#jsimageList option:selected").text();
|
||||||
var textareaValue = $("#jscontent").val();
|
var textareaValue = $("#jscontent").val();
|
||||||
$("#jscontent").val(textareaValue + filename + "\n");
|
$("#jscontent").val(textareaValue + "<img src=\""+filename+"\" alt=\"\">" + "\n");
|
||||||
});
|
});
|
||||||
|
|
||||||
$(function()
|
$(function()
|
||||||
|
|
|
@ -93,13 +93,13 @@ class pluginsimpleMDE extends Plugin {
|
||||||
tabSize: '.$this->getDbField('tabSize').',
|
tabSize: '.$this->getDbField('tabSize').',
|
||||||
spellChecker: false,
|
spellChecker: false,
|
||||||
toolbar: ['.Sanitize::htmlDecode($this->getDbField('toolbar')).']
|
toolbar: ['.Sanitize::htmlDecode($this->getDbField('toolbar')).']
|
||||||
});';
|
});';
|
||||||
|
|
||||||
$html .= '$("#jsaddImage").on("click", function() {
|
$html .= '$("#jsaddImage").on("click", function() {
|
||||||
var filename = $("#jsimageList option:selected" ).text();
|
var filename = $("#jsimageList option:selected" ).text();
|
||||||
var text = simplemde.value();
|
var text = simplemde.value();
|
||||||
simplemde.value(text + "" + "\n");
|
simplemde.value(text + "" + "\n");
|
||||||
});';
|
});';
|
||||||
|
|
||||||
$html .= '}); </script>';
|
$html .= '}); </script>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue