Using AsciiMathML as stand-alone renderer

Using AsciiMathML as stand-alone renderer

by Steve Garlick -
Number of replies: 3
Hi,

I'd like to use the AMGoogle.js source code to render ASCIIMathML code in a textarea field. The idea is that a user could type in `asciimath expression` and the rendered output displayed in another textarea div.

What is the best way to call the parser to render just that field after user input? (I've spent a few hours pouring over the code, but I'm not having much success).

Many thanks for any clues.

Regards,

Steve Garlick
Average of ratings: -
In reply to Steve Garlick

Re: Using AsciiMathML as stand-alone renderer

by Mauno Korpelainen -
Attached one example (in AMexample.zip - I have used a similar method in some plugins/preview window) - jQuery might do the same thing much shorter but then you need jQuery script...

This example is a php file but it could as well be plain html file because that example does not use php...
In reply to Mauno Korpelainen

Re: Using AsciiMathML as stand-alone renderer

by Steve Garlick -
Many thanks again, Mauno. Code worked like a dream, can now use this standalone app to allow teachers and students to learn ASCIIMath syntax.

Regards,

Steve Garlick