I am trying to build WYSIWYG Editor to write Mathematical Formulas using MathJax. I am trying to select random content from the textarea and pasting it into
Problem Solved
just insert
MathJax.Hub.Queue(["Typeset", MathJax.Hub, "pasteselectedContent"]);
after line 32
pasteselectedContent.textContent = selectedContent.value.substring(0,start) + " " + replace + " " + selectedContent.value.substring(end,textlength);