diff options
Diffstat (limited to 'view/tpl')
-rw-r--r-- | view/tpl/wiki.tpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index 11c12e628..d0744009d 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -423,8 +423,8 @@ function wiki_delete_wiki(wikiHtmlName, resource_id) { $.post("embedphotos/photolink", {href: href}, function(ddata) { if (ddata['status']) { - var imgURL = ddata['photolink'].replace( /\[.*\]\[.*\](.*)\[.*\]\[.*\]/, '![image]($1)' ) - editor.getSession().setValue(editor.getValue() + imgURL); + var imgURL = ddata['photolink'].replace( /\[.*\]\[.*\](.*)\[.*\]\[.*\]/, '\n![image]($1)' ) + editor.getSession().insert(editor.getCursorPosition(), imgURL) } else { window.console.log('{{$modalerrorlink}}' + ':' + ddata['errormsg']); } |