Insert image links wherever cursor is in the editor
This commit is contained in:
parent
83a42afddf
commit
241b257556
@ -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( /\[.*\]\[.*\](.*)\[.*\]\[.*\]/, '' )
|
||||
editor.getSession().setValue(editor.getValue() + imgURL);
|
||||
var imgURL = ddata['photolink'].replace( /\[.*\]\[.*\](.*)\[.*\]\[.*\]/, '\n' )
|
||||
editor.getSession().insert(editor.getCursorPosition(), imgURL)
|
||||
} else {
|
||||
window.console.log('{{$modalerrorlink}}' + ':' + ddata['errormsg']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user