Virtual whiteboard for sketching hand-drawn like diagrams
Use `innerText` instead of `innerHTML` when measuring text (#312)
Gasim Gasimzada76467073f205
diff --git a/src/utils.ts b/src/utils.tsindex dcec48817a..4043c5a4cc 100644--- a/src/utils.ts+++ b/src/utils.ts@@ -34,7 +34,7 @@ export function measureText(text: string, font: string) {line.style.font = font;body.appendChild(line);// Now we can measure width and height of the letter- line.innerHTML = text;+ line.innerText = text;const width = line.offsetWidth;const height = line.offsetHeight;// Now creating 1px sized item that will be aligned to baseline