Fix TinyMCE images in protocol import [SCI-3030]

This commit is contained in:
Oleksii Kriuchykhin 2019-02-07 16:58:38 +01:00
parent dc7fdaa191
commit 2ff5199be0

View file

@ -270,7 +270,7 @@ function importProtocolFromFile(
element.getAttribute('fileref'));
var image_tag = "<img style='max-width:300px; max-height:300px;' src='data:" + element.children[1].innerHTML + ";base64," + assetBytes + "' />"
description = description.replace(match, image_tag); // replace the token with image
}).bind(this);
});
// I know is crazy but is the only way I found to pass valid HTML
return $('<div></div>').html(
description.replace('<!--[CDATA[ ', '')