render unescaped html entities in staging renderer

This commit is contained in:
Ivan Malopinsky
2018-10-24 21:39:03 -04:00
parent 6c2355a804
commit d608d984aa

View File

@@ -1042,8 +1042,12 @@ var stagingRenderer = (function() {
})
});
//Unescape HTML entities to get approximately the right width
var txt = DOM.newEl('textarea');
txt.innerHTML = htgProps.text;
stagingTextNode.nodeValue = txt.value;
//Get bounding box for the whole string (total width and height)
stagingTextNode.nodeValue = htgProps.text;
var stagingTextBBox = stagingText.getBBox();
//Get line count and split the string into words