Note: You are currently viewing documentation for Moodle 2.4. Up-to-date documentation for the latest stable version of Moodle may be available here: Sandbox.

Sandbox: Difference between revisions

From MoodleDocs
m (First steps editing a page)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
==First steps creating a Moodle specific TinyMCE plugin (for dummies)==
==Sandbox description==
   
   
This page describes the first steps of how to custom Moodle plugins for TinyMCE implemented in MOODLE 2.5
===Title 1===


This page is based on the https://docs.moodle.org/dev/TinyMCE_plugins information.
===Title 2===


===Overview===
===Title 3===


First of all, lets clarify that the plugin structure for TinyMCE in Moodle is a bit diferent than the pure TinyMCE plugin, so dont confuse them.
..
Directory /lib/editor/tinymce/plugins/ contains Moodle specific TinyMCE plugins. It supports all standard Moodle plugin features. Static files (JS, CSS, images) are loaded via PHP loader, this prevents caching problems and it may improve performance. Original JavaScript based localisation files are not supported.
 
===Subplugin Directory Structure===
 
Here we show what directorys you can find in a Moodle specific TinyMCE plugin (/lib/editor/tinymce/plugins/name_of_your_plugin):
 
/db/* 
Installation, upgrades, events, etc. It is not recommended to use database tables in these plugins.
/lang/yourplugin/tinymce_yourplugin.php 
Language strings. All strings used from TinyMCE JavaScript files must start with "yourplugin:*" prefix.
 
/tinymce/editor_plugin.js 
The actual TinyMCE plugin code.
 
/tinymce/* 
Static files used from plugin code. Use tinyMCE.baseURL for links pointing to upstream TinyMCE code. Use ed.getParam("moodle_plugin_base") when referencing non-static plugin files.
 
/lib.php 
Moodle plugin code, it has to contain at least tinymce_yourplugin class with update_init_params() method.
 
/settings.php 
Moodle plugin settings (optional).
 
/version.php 
Moodle plugin version (required).
 
/* 
Other PHP scripts used by plugin.
 
===What are the minimum files needed to start a Moodle specific TinyMCE plugin?===
 
...

Latest revision as of 13:56, 21 July 2013

Sandbox description

Title 1

Title 2

Title 3

..