Hm... don't answer this. I've realised it won't work for what I'm trying to do.
Here's the long story:
I'm creating an editor where people can input equations with parameters or variables in them and then generate a preview in which the parameters/variables are converted to numbers.
Right now, I can input a variable (as a textbox) and when you right click on it, you can specify the minimum, and maximum values as well as an increment. When the user generates the preview, the textbox is replaced by a random number within the max and min and withing the specified increment.
For example, the user could input:
"Lorem Ipsum [textbox]" then right click and choose min=1, max=10 and inc=2
and the preview would be:
"Lorem Ipsum 4"
Now what I want to do is put that variable/parameter into a rendered equation. So that I can have something like:
"Lorem Ipsum $\sqrt{ [textbox] }$" where everything is rendered and the user can right click the textbox that's within the square root
and have the preview be:
"Lorem Ipsum $\sqrt{4}$" (again, rendered)
Is it possible to have this kind of functionality with MathJax?
The text box doesn't have to be a text box, it could be something as simple as blue text (anything to distinguish it).
Thanks,
Garnet