PHP Classes

File: public/js/tinymce/src/plugins/table/src/main/js/Plugin.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/table/src/main/js/Plugin.js   Download  
File: public/js/tinymce/src/plugins/table/src/main/js/Plugin.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 2,582 bytes
 

Contents

Class file image Download
/** * Plugin.js * * Released under LGPL License. * Copyright (c) 1999-2017 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ /** * This class contains all core logic for the table plugin. * * @class tinymce.table.Plugin * @private */ define( 'tinymce.plugins.table.Plugin', [ 'tinymce.core.PluginManager', 'tinymce.plugins.table.actions.Clipboard', 'tinymce.plugins.table.actions.InsertTable', 'tinymce.plugins.table.actions.TableActions', 'tinymce.plugins.table.actions.TableCommands', 'tinymce.plugins.table.actions.ResizeHandler', 'tinymce.plugins.table.queries.TabContext', 'tinymce.plugins.table.selection.CellSelection', 'tinymce.plugins.table.selection.Ephemera', 'tinymce.plugins.table.selection.Selections', 'tinymce.plugins.table.ui.Buttons', 'tinymce.plugins.table.ui.MenuItems' ], function (PluginManager, Clipboard, InsertTable, TableActions, TableCommands, ResizeHandler, TabContext, CellSelection, Ephemera, Selections, Buttons, MenuItems) { function Plugin(editor) { var self = this; var resizeHandler = ResizeHandler(editor); var cellSelection = CellSelection(editor, resizeHandler.lazyResize); var actions = TableActions(editor, resizeHandler.lazyWire); var selections = Selections(editor); TableCommands.registerCommands(editor, actions, cellSelection, selections); Clipboard.registerEvents(editor, selections, actions, cellSelection); MenuItems.addMenuItems(editor, selections); Buttons.addButtons(editor); Buttons.addToolbars(editor); editor.on('PreInit', function () { // Remove internal data attributes editor.serializer.addTempAttr(Ephemera.firstSelected()); editor.serializer.addTempAttr(Ephemera.lastSelected()); }); // Enable tab key cell navigation if (editor.settings.table_tab_navigation !== false) { editor.on('keydown', function (e) { TabContext.handle(e, editor, actions, resizeHandler.lazyWire); }); } editor.on('remove', function () { resizeHandler.destroy(); cellSelection.destroy(); }); self.insertTable = function (columns, rows) { return InsertTable.insert(editor, columns, rows); }; self.setClipboardRows = TableCommands.setClipboardRows; self.getClipboardRows = TableCommands.getClipboardRows; } PluginManager.add('table', Plugin); return function () { }; } );