Note:

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

Atto: Difference between revisions

From MoodleDocs
No edit summary
m (Protected "Atto": Developer Docs Migration ([Edit=Allow only administrators] (indefinite)))
 
(32 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{Moodle 2.7}}
{{Template:Migrated|newDocId=/docs/apis/plugintypes/atto/}}
 
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 plugin Php API]]

Latest revision as of 03:28, 5 January 2023

Important:

This content of this page has been updated and migrated to the new Moodle Developer Resources. The information contained on the page should no longer be seen up-to-date.

Why not view this page on the new site and help us to migrate more content to the new site!