Easymde insert image and insert image at cursor position #1405
This commit is contained in:
parent
52ecf89b77
commit
5986c1d220
1 changed files with 3 additions and 3 deletions
|
@ -78,12 +78,12 @@ return <<<EOF
|
||||||
|
|
||||||
// Function required for Bludit
|
// Function required for Bludit
|
||||||
// Insert HTML content at the cursor position
|
// Insert HTML content at the cursor position
|
||||||
function editorInsertContent(html, type='') {
|
function editorInsertContent(content, type='') {
|
||||||
var text = easymde.value();
|
var text = easymde.value();
|
||||||
if (type == 'image') {
|
if (type == 'image') {
|
||||||
easymde.value(text + "![$langImage]("+filename+")" + "\\n");
|
easymde.codemirror.replaceSelection("![$langImage]("+content+")" + "\\n");
|
||||||
} else {
|
} else {
|
||||||
easymde.value(html + "\\n");
|
easymde.codemirror.replaceSelection(content + "\\n");
|
||||||
}
|
}
|
||||||
easymde.codemirror.refresh();
|
easymde.codemirror.refresh();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue