use regex for finding img where src is a blob
This commit is contained in:
committed by
Sebastiaan Janssen
parent
d7b25fc4dc
commit
8d3b74fbec
@@ -1346,8 +1346,9 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
|
||||
var content = e.content;
|
||||
|
||||
// Upload BLOB images (dragged/pasted ones)
|
||||
if(content.indexOf('<img src="blob:') > -1){
|
||||
|
||||
// find src attribute where value starts with `blob:`
|
||||
// search is case-insensitive and allows single or double quotes
|
||||
if(content.search(/src=["']blob:.*?["']/gi) !== -1){
|
||||
args.editor.uploadImages(function(data) {
|
||||
// Once all images have been uploaded
|
||||
data.forEach(function(item) {
|
||||
|
||||
Reference in New Issue
Block a user