PHP Classes

File: public/js/tinymce/src/plugins/link/src/main/js/ui/Controls.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/link/src/main/js/ui/Controls.js   Download  
File: public/js/tinymce/src/plugins/link/src/main/js/ui/Controls.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,014 bytes
 

Contents

Class file image Download
/** * Controls.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 */ define( 'tinymce.plugins.link.ui.Controls', [ 'tinymce.plugins.link.core.Actions', 'tinymce.plugins.link.core.Utils' ], function (Actions, Utils) { var setupButtons = function (editor) { editor.addButton('link', { active: false, icon: 'link', tooltip: 'Insert/edit link', onclick: Actions.openDialog(editor), onpostrender: Actions.toggleActiveState(editor) }); editor.addButton('unlink', { active: false, icon: 'unlink', tooltip: 'Remove link', onclick: Utils.unlink(editor), onpostrender: Actions.toggleActiveState(editor) }); if (editor.addContextToolbar) { editor.addButton('openlink', { icon: 'newtab', tooltip: 'Open link', onclick: Actions.gotoSelectedLink(editor) }); } }; var setupMenuItems = function (editor) { editor.addMenuItem('openlink', { text: 'Open link', icon: 'newtab', onclick: Actions.gotoSelectedLink(editor), onPostRender: Actions.toggleViewLinkState(editor), prependToContext: true }); editor.addMenuItem('link', { icon: 'link', text: 'Link', shortcut: 'Meta+K', onclick: Actions.openDialog(editor), stateSelector: 'a[href]', context: 'insert', prependToContext: true }); }; var setupContextToolbars = function (editor) { if (editor.addContextToolbar) { editor.addContextToolbar( Actions.leftClickedOnAHref(editor), 'openlink | link unlink' ); } }; return { setupButtons: setupButtons, setupMenuItems: setupMenuItems, setupContextToolbars: setupContextToolbars }; } );