change insertContent to selection.setContent

This commit is contained in:
Niels Lyngsø
2019-02-27 10:28:40 +01:00
parent b5bda772af
commit 60b178dcf7

View File

@@ -427,8 +427,8 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
data["rel"] = img.id;
data["data-id"] = img.id;
}
editor.insertContent(editor.dom.createHTML('img', data));
editor.selection.setContent(editor.dom.createHTML('img', data));
$timeout(function () {
var imgElm = editor.dom.get('__mcenew');