Mathslate for Atto

Atto ::: atto_mathslate
Maintained by Daniel Thies
Mathslate is a customizable graphical tool for constructing mathematics within Moodle. This plugin adds the tool to the Atto editor. It may be used in addition to or as a replacement for other formula editors.
Latest release:
811 sites
22 fans
Current versions available: 2
Error: mdb->get_record() found more than one record!
  • line 1691 of /lib/dml/moodle_database.php: call to debugging()
  • line 1651 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 1630 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
  • line 3382 of /lib/moodlelib.php: call to moodle_database->get_record()
  • line 435 of /lib/rsslib.php: call to get_user_key()
  • line 1369 of /local/plugins/lib/helper.php: call to rss_get_token()
  • line 3205 of /local/plugins/renderer.php: call to local_plugins_helper::get_rss_url()
  • line 826 of /local/plugins/renderer.php: call to local_plugins_plugin_renderer->plugin_comments()
  • line 495 of /lib/outputrenderers.php: call to local_plugins_renderer->render_local_plugins_plugin()
  • line 78 of /local/plugins/view.php: call to plugin_renderer_base->render()

Mathslate is a mathematics editor that this plugin adds to the Atto toolbar.  It is similar in functionality to DragMath which was included as a TinyMCE plugin in the Moodle core for 2.0-2.7.  MathSlate however has no Java dependency, and consequently it should usable in a larger variety of browsers including those on mobile devices. This plugin depends on the TinyMCE plugin.

To install unpack in the directory for Atto plugins and add the word 'mathslate' in the Atto toolbar settings to add the button in an appropriate place on the toolbar.  Enable MathJax in the heading or by enabling the MathJax filter.  The button will only appear on pages where MathJax is available.

CI status


Screenshot #0


Daniel Thies (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Fri, Mar 13, 2015, 7:40 PM
    Hi Daniel. Thanks for sharing this plugin with the community. I have troubles trying to make the plugin work. I installed it correctly together with the dependency and configured the Atto bar to display it. However, the button does not appear. I was trying to debug and the reason is that the function initializer() returns after this: if (typeof MathJax === 'undefined' && !this.get('filteractive')) Any idea what might be reason for this? The description page does not mention any special setup needed and the TinyMCE variant of the plugin work well on the same site.
  • Fri, Mar 13, 2015, 7:53 PM
    Turning TeX filter on and off does not make any difference.
  • Sat, Mar 14, 2015, 3:41 AM
    Hello David,
    Thanks for looking at this. Have you tried it with the MathJax filter on? This is necessary if MathJax is not enabled in the theme head. The line you found is making this check.
    This behaviour is different than the TinyMCE plugin for some historical reasons. The TinyMCE plugin was started in Moodle 2.4, and has a setting for a MathJax url to load if it is not available in the header, and loads it into an iframe header. Since MathJax was added to the core in 2.7 with the Atto, this plugin uses the filter instead of the one in the TinyMCE plugin to load MathJax. I could remove the restriction to allow using the Mathslate even when the MathJax filter is not enabled, but I am not sure if that might represent a security problem of some kind. A checkbox setting may be needed.
    It also may be good to consider a plugin set for dependencies. Currently this plugin depends on the TinyMCE one where the bulk of the yui code is. However, I am assuming eventually that TinyMCE or yui support will be removed and this will no longer make sense.
  • Sat, Mar 14, 2015, 4:08 AM
    I updated the description to include this.
  • Mon, Mar 16, 2015, 4:21 PM
    That was the issue indeed. Thanks for updating the description Daniel. You are cleared to land now, welcome to the Plugins directory!
  • Wed, Aug 12, 2015, 8:39 PM
    So far I've been unable to get the button to show up in Atto in Moodle 2.9. TinyMCE works fine though.
  • Wed, Aug 12, 2015, 9:36 PM
    Hi Matthew, Did you add 'mathslate' to Atto toolbar settings to position the button? The step is necessary in Atto, but not TinyMCE.
  • Wed, Aug 12, 2015, 11:29 PM
    I was unaware it was unnecessary in TinyMCE so I put it in both configurations. I've tried adding it in many areas of the editor and it doesn't show up. I've turned the mathjax filter on, off. I've setup a local copy of MathJax, used the CDN. Still can't get the MathSlate icon to show up in Atto.
  • Thu, Aug 13, 2015, 1:59 AM
    Is the core Atto equation editor appearing with MathJax filter on and TeX notation turned off? Does that editor display correctly? This should tell you whether MathJax is working.
    If the core editor works, the check javascript console in you browsers tools menu to see if there is a helpful error message.
  • Thu, Aug 13, 2015, 2:41 AM
    The editor displays correctly with the core Atto editor. Also, just found out that mathslate button does show up in Atto if the default equation editor button in enabled.
  • Thu, Aug 13, 2015, 3:30 AM
    Thanks Matthew. I am able to reproduce this now. MathJax filter is not loading MathJax if the equation editor is not enabled. I will try to update this soon.
  • Thu, Aug 13, 2015, 5:19 AM
    Matthew, I updated with a new release that loads MathJax when the equation editor is disabled.
  • Thu, Aug 13, 2015, 8:12 PM
    Works like a charm now. Thanks Daniel
  • Mon, Mar 13, 2017, 7:45 AM
    The description of the last version mentions a prototype that supports Moodle 2.6. Which version of the plugin is this?

    Great job!
  • Mon, Mar 13, 2017, 9:47 AM
    The is a branch for 2.5 in the github repo I think that this will work with 2.6 if Atto is installed as an addon, but it has been a long time since I tried it.
1 2
Please login to post comments