Atto: Difference between revisions
Damyon Wiese (talk | contribs) No edit summary |
Damyon Wiese (talk | contribs) |
||
Line 17: | Line 17: | ||
/settings.php | /settings.php | ||
Optional. Only required if your plugin wants to support custom admin settings. | Optional. Only required if your plugin wants to support custom admin settings. See: https://docs.moodle.org/dev/Admin_settings#Individual_settings for more info on settings. | ||
/version.php | /version.php | ||
Required. Moodle plugin version. | Required. Moodle plugin version. See: https://docs.moodle.org/dev/version.php for more info on version files. | ||
/lang/en/atto_pluginname.php | /lang/en/atto_pluginname.php | ||
Line 27: | Line 27: | ||
/yui/src/button/ | /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. | 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. | See: https://docs.moodle.org/dev/YUI/Modules for more information about YUI modules. | ||
==Atto subplugin Php API== | ==Atto subplugin Php API== | ||
==Atto subplugin Javascript API== | ==Atto subplugin Javascript API== |
Revision as of 04:33, 29 January 2014
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. See: https://docs.moodle.org/dev/Admin_settings#Individual_settings for more info on settings.
/version.php Required. Moodle plugin version. See: https://docs.moodle.org/dev/version.php for more info on version files.
/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.