Atto: Mathslate for Atto

atto_mathslate
Maintained by Picture of Daniel Thies 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.
258 sites
220 downloads
7 fans

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.

Screenshots

Screenshot #0

Contributors

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

Comments RSS

Show comments
  • Picture of David Mudrák
    Fri, 13 Mar 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.
  • Picture of David Mudrák
    Fri, 13 Mar 2015, 7:53 PM
    Turning TeX filter on and off does not make any difference.
  • Picture of Daniel Thies
    Sat, 14 Mar 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.
  • Picture of Daniel Thies
    Sat, 14 Mar 2015, 4:08 AM
    I updated the description to include this.
  • Picture of David Mudrák
    Mon, 16 Mar 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!
  • Picture of Matthew Davidson
    Wed, 12 Aug 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.
  • Picture of Daniel Thies
    Wed, 12 Aug 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.
  • Picture of Matthew Davidson
    Wed, 12 Aug 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.
  • Picture of Daniel Thies
    Thu, 13 Aug 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.
  • Picture of Matthew Davidson
    Thu, 13 Aug 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.
  • Picture of Daniel Thies
    Thu, 13 Aug 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.
  • Picture of Daniel Thies
    Thu, 13 Aug 2015, 5:19 AM
    Matthew, I updated with a new release that loads MathJax when the equation editor is disabled.
  • Picture of Matthew Davidson
    Thu, 13 Aug 2015, 8:12 PM
    Works like a charm now. Thanks Daniel
  • Picture of Editorial FE
    Mon, 13 Mar 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!
  • Picture of Daniel Thies
    Mon, 13 Mar 2017, 9:47 AM
    The is a branch for 2.5 in the github repo https://github.com/dthies/moodle-atto_mathslate/archive/MOODLE_25_STABLE.zip. 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