javascript – Is there a way to take math equations return in tags from mathJax lib to next line when max-width for div reaches its limit

I want to write javascript program which satisfies this condition “There is a div which is treated as textArea and it has math symbols like integration, summation in math tags like or or from mathJax lib but when typed in one line and if max-width of that div cross then line doesn’t get break. Now I want that when max-width of the div crosses then those math symbols come in another line after max-width and the line gets broken as it does for text written in it but there is no pseudo content and we need to bring these math symbols in the next line if max-width is reached”

HTML is built as given in the image with other wrapper divs
enter image description here

Read more here: Source link