Sign in to follow this  
jensweigel

CKEditor and the MathJax Plugin

Recommended Posts

Hi guys!

Im currently trying to integrate the MathJax plugin (http://ckeditor.com/addon/mathjax) for CKEditor. But it doesnt work. Does any one use this plugin?

It is instaled correctly, is checked in the Field input, all requered plugins are installed, I dont get any JavaScript error but dont see any button.

Any suggestions?

Share this post


Link to post
Share on other sites

So solved it by myself! It was the name for the toolbar option.  It wasent mathjax and not MathJax its Mathjax.

Such a stupid mistake …

  • Like 1

Share this post


Link to post
Share on other sites

@jensweigel
Could you or someone please list out the steps on how you were able to integrate Mathjax?
I am kind of new to Processwire and am working with Processwire 2.7 and ckeditor (module version 1.5.4)
Thanks!

Share this post


Link to post
Share on other sites

Download the plugin from the site and uncompress it.

Upload the plugin folder under site/modules/IputfieldCKEditor/plugins, activate the plugin in the field configuration in PW (at the very bottom you will see a group of checkboxes that already includes the PW CKEditor plugins for image upload and links, you should see the uploaded plugin now). Check it.

As stated above, add the correct option in the toolbar configuration. and you should see it in the editor now.

  • Like 2

Share this post


Link to post
Share on other sites

@jensweigel @elabx
I downloaded the mathjax plugin and also the other dependencies which included

clipboard,dialogui,lineutiles,notification and widget. When I go the group of checkboxes , I am able to see my field on my page as long as keep mathjax and widget plugins unchecked. As soon as i check them, there is a blank space in edit page option where the field is present. However, when I view the page, the data that had been entered (before I checked these plugins) is displayed (without the latex rendering).

I also tried the toolbar option(through PW GUI) of both Mathjax and mathjax, but it didn't work
Could it be because of the version? The CKeditor page states its for version 4.3+ and I have the Processeswire module version of 1.5.4 
Is there any other alternative. Here is a snippet of my config file

CKEDITOR.editorConfig = function( config ) {
	// Define changes to default configuration here. For example:
	// config.uiColor = '#AADC6E';
    config.extraPlugins = 'widget';
    config.extraPlugins = 'lineutils';
    config.extraPlugins = 'dialogui';
    config.extraPlugins = 'dialog';
    config.extraPlugins = 'notification';
    config.extraPlugins = 'clipboard';
    config.extraPlugins = 'mathjax';
};

 

Share this post


Link to post
Share on other sites

FYI I  have added this plugin to AdminOnSteroids module and will be available in the next update. Works fine in the admin with the latest PW, on the frontend it needs manual initialization (of course). 

Share this post


Link to post
Share on other sites

@tpr
I am looking for something on PW 2.7. It is going to be difficult for me to upgrade cause I have just been brought into this project and am new to PW itself

Share this post


Link to post
Share on other sites

Sorry, I missed that part, then it's not an option for you.

Share this post


Link to post
Share on other sites
On 2/14/2018 at 7:13 PM, tpr said:

FYI I  have added this plugin to AdminOnSteroids module and will be available in the next update. Works fine in the admin with the latest PW, on the frontend it needs manual initialization (of course). 

Thanks for adding it! I have just added it today where I think the client could probably use it (instead of making images for each formula).

btw here is the link / instruction for the frontend: https://docs.ckeditor.com/ckeditor4/latest/guide/dev_mathjax.html#displaying-on-target-page

 

Share this post


Link to post
Share on other sites

Actually, hold on... I just added this JS, but it doesn't work.

Is there anything else that one needs to do / add?

@tpr and ideas? I'm using PW 3.0.99. Tried to load it via Cloudflare, and also with a local copy (with and without AIOM).

Don't know what I did, but got it to work finally...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.