wp/wp-includes/js/tinymce/plugins/hr/plugin.js
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
child 9 177826044cd9
equal deleted inserted replaced
6:490d5cc509ed 7:cf61fcea0001
     1 /**
     1 (function () {
     2  * plugin.js
     2 var hr = (function () {
     3  *
     3   'use strict';
     4  * Copyright, Moxiecode Systems AB
       
     5  * Released under LGPL License.
       
     6  *
       
     7  * License: http://www.tinymce.com/license
       
     8  * Contributing: http://www.tinymce.com/contributing
       
     9  */
       
    10 
     4 
    11 /*global tinymce:true */
     5   var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
    12 
     6 
    13 tinymce.PluginManager.add('hr', function(editor) {
     7   var register = function (editor) {
    14 	editor.addCommand('InsertHorizontalRule', function() {
     8     editor.addCommand('InsertHorizontalRule', function () {
    15 		editor.execCommand('mceInsertContent', false, '<hr />');
     9       editor.execCommand('mceInsertContent', false, '<hr />');
    16 	});
    10     });
       
    11   };
       
    12   var $_cqh592cnjjgwebvk = { register: register };
    17 
    13 
    18 	editor.addButton('hr', {
    14   var register$1 = function (editor) {
    19 		icon: 'hr',
    15     editor.addButton('hr', {
    20 		tooltip: 'Horizontal line',
    16       icon: 'hr',
    21 		cmd: 'InsertHorizontalRule'
    17       tooltip: 'Horizontal line',
    22 	});
    18       cmd: 'InsertHorizontalRule'
       
    19     });
       
    20     editor.addMenuItem('hr', {
       
    21       icon: 'hr',
       
    22       text: 'Horizontal line',
       
    23       cmd: 'InsertHorizontalRule',
       
    24       context: 'insert'
       
    25     });
       
    26   };
       
    27   var $_13g834cojjgwebvl = { register: register$1 };
    23 
    28 
    24 	editor.addMenuItem('hr', {
    29   global.add('hr', function (editor) {
    25 		icon: 'hr',
    30     $_cqh592cnjjgwebvk.register(editor);
    26 		text: 'Horizontal line',
    31     $_13g834cojjgwebvl.register(editor);
    27 		cmd: 'InsertHorizontalRule',
    32   });
    28 		context: 'insert'
    33   function Plugin () {
    29 	});
    34   }
    30 });
    35 
       
    36   return Plugin;
       
    37 
       
    38 }());
       
    39 })();