diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-12-02 12:27:59 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-12-02 12:27:59 +0100 |
commit | ce0ba8edbd24ed782706c15374bd1d41f2919713 (patch) | |
tree | f93e9fc3d5d30462742ac8e013342067109eca86 /view/tpl/wiki.tpl | |
parent | ec97464007d2e770860523908231a771f7b811ec (diff) | |
download | volse-hubzilla-ce0ba8edbd24ed782706c15374bd1d41f2919713.tar.gz volse-hubzilla-ce0ba8edbd24ed782706c15374bd1d41f2919713.tar.bz2 volse-hubzilla-ce0ba8edbd24ed782706c15374bd1d41f2919713.zip |
fix embed image for text/bbcode
Diffstat (limited to 'view/tpl/wiki.tpl')
-rw-r--r-- | view/tpl/wiki.tpl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index 226d785f5..cf4144357 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -366,8 +366,13 @@ $.post("embedphotos/photolink", {href: href}, function(ddata) { if (ddata['status']) { + {{if !$mimeType || $mimeType == 'text/markdown'}} var imgURL = ddata['photolink'].replace( /\[.*\]\[.*\](.*)\[.*\]\[.*\]/, '\n![image]($1)' ) editor.getSession().insert(editor.getCursorPosition(), imgURL) + {{else}} + var currentContent = $('#editor').val(); + $('#editor').val(currentContent + ddata['photolink']); + {{/if}} } else { window.console.log('{{$modalerrorlink}}' + ':' + ddata['errormsg']); } |