mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-27 19:47:42 +01:00
855889f7aa
- Removes wp-tinymce-schema.js and mark-loaded.js, no longer needed. - Removes the inlinepopups and most of the wpdialogs plugins; wpdialog.js is moved to wp-includes/js. - Adds charmap, compat3x, image, link and textcolor plugins, previously contained in /themes/advanced. - Updates the wordpress, wpeditimage, wpfullscreen, wpgallery and wplink plugins. - Updates DFW, wp-admin/js/wp-fullscreen.js. See #24067. Built from https://develop.svn.wordpress.org/trunk@26876 git-svn-id: http://core.svn.wordpress.org/trunk@26759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
28 lines
674 B
JavaScript
28 lines
674 B
JavaScript
/* global tinymce */
|
|
tinymce.PluginManager.add( 'wplink', function( editor ) {
|
|
// Register a command so that it can be invoked by using tinyMCE.activeEditor.execCommand( 'WP_Link' );
|
|
editor.addCommand( 'WP_Link', function() {
|
|
if ( typeof window.wpLink !== 'undefined' ) {
|
|
window.wpLink.open( editor.id );
|
|
}
|
|
});
|
|
|
|
editor.addButton( 'link', {
|
|
icon: 'link',
|
|
tooltip: 'Insert/edit link',
|
|
shortcut: 'Alt+Shift+A',
|
|
cmd: 'WP_Link',
|
|
stateSelector: 'a[href]'
|
|
});
|
|
|
|
editor.addMenuItem( 'link', {
|
|
icon: 'link',
|
|
text: 'Insert link',
|
|
shortcut: 'Alt+Shift+A',
|
|
cmd: 'WP_Link',
|
|
stateSelector: 'a[href]',
|
|
context: 'insert',
|
|
prependToContext: true
|
|
});
|
|
});
|