Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Atto

From MoodleDocs
Revision as of 04:29, 29 January 2014 by Damyon Wiese (talk | contribs)

Moodle 2.7


Atto is a javascript text editor built specifically for Moodle. Atto is the default text editor in Moodle from 2.7 onwards.

Atto is implemented as a standard Moodle text editor plugin. Most of the code is written in javascript as a standard Moodle YUI module.

Atto Plugins

All of the buttons/menus in Atto are implemented as true Moodle subplugins. This means that the subplugins can do anything a subplugin can do including, lang strings, db tables, yui modules.

There are a couple of extra functions/structure required for an Atto subplugin which are required in order to load a plugin on the toolbar.

Structure of an Atto Plugin

/lib.php Optional. Only required if your plugin needs to implement one of the component callbacks listed below.

/settings.php Optional. Only required if your plugin wants to support custom admin settings.

/version.php Required. Moodle plugin version.

/lang/en/atto_pluginname.php Required. Language file. This file is required and must at least define the language string 'pluginname'.

/yui/src/button/ Required. The plugin must implement a YUI module that will be included by the editor when the page loads. That YUI module must be named 'button' and must insert itself a class into the M.<plugin name> namespace, with an init function that will be called to initialise the editor. See: https://docs.moodle.org/dev/YUI/Modules for more information about YUI modules.

Atto subplugin Php API

Atto subplugin Javascript API