PHP Classes

File: WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/js/tinymce/plugins/anchor/plugin.js

Recommend this page to a friend!
  Classes of Jules Warner   WICMS   WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/js/tinymce/plugins/anchor/plugin.js   Download  
File: WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/js/tinymce/plugins/anchor/plugin.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WICMS
Database driven content management system with PDO
Author: By
Last change:
Date: 7 years ago
Size: 1,055 bytes
 

Contents

Class file image Download
/** * plugin.js * * Released under LGPL License. * Copyright (c) 1999-2015 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ /*global tinymce:true */ tinymce.PluginManager.add('anchor', function(editor) { function showDialog() { var selectedNode = editor.selection.getNode(), name = ''; if (selectedNode.tagName == 'A') { name = selectedNode.name || selectedNode.id || ''; } editor.windowManager.open({ title: 'Anchor', body: {type: 'textbox', name: 'name', size: 40, label: 'Name', value: name}, onsubmit: function(e) { editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', { id: e.data.name })); } }); } editor.addCommand('mceAnchor', showDialog); editor.addButton('anchor', { icon: 'anchor', tooltip: 'Anchor', onclick: showDialog, stateSelector: 'a:not([href])' }); editor.addMenuItem('anchor', { icon: 'anchor', text: 'Anchor', context: 'insert', onclick: showDialog }); });