]> CRI, Mines Paris - PSL - ckeditor.git/blobdiff - skins/ckeditor/_source/plugins/a11yhelp/plugin.js
Mimimum syndical pour en faire un produit zope / cmf.
[ckeditor.git] / skins / ckeditor / _source / plugins / a11yhelp / plugin.js
diff --git a/skins/ckeditor/_source/plugins/a11yhelp/plugin.js b/skins/ckeditor/_source/plugins/a11yhelp/plugin.js
new file mode 100644 (file)
index 0000000..80e556c
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
+For licensing, see LICENSE.html or http://ckeditor.com/license\r
+*/\r
+\r
+/**\r
+ * @fileOverview Plugin definition for the a11yhelp, which provides a dialog\r
+ * with accessibility related help.\r
+ */\r
+\r
+(function()\r
+{\r
+       var pluginName = 'a11yhelp',\r
+               commandName = 'a11yHelp';\r
+\r
+       CKEDITOR.plugins.add( pluginName,\r
+       {\r
+               // List of available localizations.\r
+               availableLangs : { en:1, he:1 },\r
+\r
+               init : function( editor )\r
+               {\r
+                       var plugin = this;\r
+                       editor.addCommand( commandName,\r
+                               {\r
+                                       exec : function()\r
+                                       {\r
+                                               var langCode = editor.langCode;\r
+                                               langCode = plugin.availableLangs[ langCode ] ? langCode : 'en';\r
+\r
+                                               CKEDITOR.scriptLoader.load(\r
+                                                               CKEDITOR.getUrl( plugin.path + 'lang/' + langCode + '.js' ),\r
+                                                               function()\r
+                                                               {\r
+                                                                       CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ langCode ] );\r
+                                                                       editor.openDialog( commandName );\r
+                                                               });\r
+                                       },\r
+                                       modes : { wysiwyg:1, source:1 },\r
+                                       readOnly : 1,\r
+                                       canUndo : false\r
+                               });\r
+\r
+                       CKEDITOR.dialog.add( commandName, this.path + 'dialogs/a11yhelp.js' );\r
+               }\r
+       });\r
+})();\r