So, I have nearly the exact same question as:
But I didn’t think I should necro a thread from 2017, particularly since my question doesn’t involve React. Instead, it involves MathQuill (again). I’ll let the MathQuill docs explain:
MathQuill uses computed dimensions, so if they change (because an element was mathquill-ified before it was in the visible HTML DOM, or the font size changed), then you’ll need to tell MathQuill to recompute:
var mathFieldSpan = $('<span>\\sqrt{2}</span>'); var mathField = MQ.MathField(mathFieldSpan[0]); mathFieldSpan.appendTo(document.body); mathField.reflow();
Currently, if I load markup into Prosemirror that contains math expressions, they sometimes have visual bugs. Is there a callback for when the NodeView gets added to the DOM, so that I can call mathField.reflow()
?