Re: [mathjax-users] MathJax tinyMCE plugin

2,132 views
Skip to first unread message
Message has been deleted

Peter Krautzberger

unread,
May 15, 2014, 4:53:06 AM5/15/14
to mathja...@googlegroups.com
Hi,

A quick search around the web yields


Hope this helps,
Peter.


On Tue, May 13, 2014 at 5:47 PM, guzdafunk <funk...@gmx.de> wrote:
Hi everybody,

I wonder if there is a simple way to implement MathJax into the tinymce editor: http://www.tinymce.com/
in a way that the user simply hits a button, a popup shows up and the latex code is shown in the text window right away.
Is something like this already available?

Thank you so much for this wonderful tool!




--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

det...@gmail.com

unread,
Jun 1, 2014, 11:22:24 PM6/1/14
to mathja...@googlegroups.com
Hello,

The reference to Mathslate above is for a Moodle specific version. I reworked it a bit so that it will work in a more standard TinyMCE 4 installation although it could use some CSS work.  The independent version is https://github.com/dthies/tinymce4-mathslate.
I looked a little at trying to extend the TinyMCE preview plugin to use MathJax, but kept getting security errors. I think this may have been what the original post was looking for.

Daniel

Peter Krautzberger

unread,
Jun 2, 2014, 4:18:45 AM6/2/14
to mathja...@googlegroups.com
Thanks for sharing this, Daniel.


Daniel Thies

unread,
Jun 4, 2014, 9:44:41 PM6/4/14
to mathja...@googlegroups.com
I did find an easy way to do previews in TinyMCE using mathjax.  TinyMCE can be modified to use mathjax in its native preview plugin with the following procedure:
First install both the development versiion TinyMCE 4.0 and MathJax on the same server (CDN copies will not work with this method). Edit the file in the TinyMCE distribution js/tinymce/plugins/preview/pluign.js.  Replace 'sandbox="allow-scripts"' with 'sandbox="allow-scripts allow-same-origin"'. Then include MathJax in the header by adding after
headHtml += '<base href="' + editor.documentBaseURI.getURI() + '">';
the line
headHtml += '<script src="../mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>';
where the path is adjusted to your MathJax installation (this assumes tinymce and mathjax are in the same directory of the server).
After this initialize an editor with tinymce.js in a page on your server which has plugin 'preview' enabled. Visit it with a browser and type TeX in the editor then select view preview from menu or toolbar.  MathJax should render the TeX in the preview popup.

nathan...@gmail.com

unread,
Oct 14, 2014, 10:39:13 AM10/14/14
to mathja...@googlegroups.com

Looks like someone has done this, but it's in French on github.
I haven't tested the plugin advertised there, but there's a screenshot, so something's working...

Nathan
Reply all
Reply to author
Forward
0 new messages