X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/lib/editor/atto/yui/src/editor/js
home
/
cbholdings
/
pasukulu
/
lib
/
editor
/
atto
/
yui
/
src
/
editor
/
js
/
📁
..
📄
autosave-io.js
(7.95 KB)
📄
autosave.js
(9.2 KB)
📄
clean.js
(28.31 KB)
📄
commands.js
(6.67 KB)
📄
editor-plugin-buttons.js
(35.44 KB)
📄
editor-plugin-dialogue.js
(3.52 KB)
📄
editor-plugin.js
(4.13 KB)
📄
editor.js
(14.51 KB)
📄
filepicker.js
(2.35 KB)
📄
menu.js
(9.32 KB)
📄
notify.js
(4.44 KB)
📄
selection.js
(12.99 KB)
📄
styling.js
(7.38 KB)
📄
textarea.js
(3.72 KB)
📄
toolbar-keyboardnav.js
(6.46 KB)
📄
toolbar.js
(1.89 KB)
Editing: editor-plugin.js
// This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Atto editor plugin. * * @module moodle-editor_atto-plugin * @submodule plugin-base * @package editor_atto * @copyright 2014 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * A Plugin for the Atto Editor used in Moodle. * * This class should not be directly instantiated, and all Editor plugins * should extend this class. * * @namespace M.editor_atto * @class EditorPlugin * @main * @constructor * @uses M.editor_atto.EditorPluginButtons * @uses M.editor_atto.EditorPluginDialogue */ function EditorPlugin() { EditorPlugin.superclass.constructor.apply(this, arguments); } var GROUPSELECTOR = '.atto_group.', GROUP = '_group'; Y.extend(EditorPlugin, Y.Base, { /** * The name of the current plugin. * * @property name * @type string */ name: null, /** * A Node reference to the editor. * * @property editor * @type Node */ editor: null, /** * A Node reference to the editor toolbar. * * @property toolbar * @type Node */ toolbar: null, initializer: function(config) { // Set the references to configuration parameters. this.name = config.name; this.toolbar = config.toolbar; this.editor = config.editor; // Set up the prototypal properties. // These must be set up here becuase prototypal arrays and objects are copied across instances. this.buttons = {}; this.buttonNames = []; this.buttonStates = {}; this.menus = {}; this._primaryKeyboardShortcut = []; this._buttonHandlers = []; this._menuHideHandlers = []; this._highlightQueue = {}; }, /** * Mark the content ediable content as having been changed. * * This is a convenience function and passes through to * {{#crossLink "M.editor_atto.EditorTextArea/updateOriginal"}}updateOriginal{{/crossLink}}. * * @method markUpdated */ markUpdated: function() { // Save selection after changes to the DOM. If you don't do this here, // subsequent calls to restoreSelection() will fail expecting the // previous DOM state. this.get('host').saveSelection(); return this.get('host').updateOriginal(); } }, { NAME: 'editorPlugin', ATTRS: { /** * The editor instance that this plugin was instantiated by. * * @attribute host * @type M.editor_atto.Editor * @writeOnce */ host: { writeOnce: true }, /** * The toolbar group that this button belongs to. * * When setting, the name of the group should be specified. * * When retrieving, the Node for the toolbar group is returned. If * the group doesn't exist yet, then it is created first. * * @attribute group * @type Node * @writeOnce */ group: { writeOnce: true, getter: function(groupName) { var group = this.toolbar.one(GROUPSELECTOR + groupName + GROUP); if (!group) { group = Y.Node.create('<div class="atto_group ' + groupName + GROUP + '"></div>'); this.toolbar.append(group); } return group; } } } }); Y.namespace('M.editor_atto').EditorPlugin = EditorPlugin;
Upload File
Create Folder