~canonical-sysadmins/wordpress/4.7.2

« back to all changes in this revision

Viewing changes to wp-includes/js/tinymce/plugins/hr/plugin.js

  • Committer: Jacek Nykis
  • Date: 2015-01-05 16:17:05 UTC
  • Revision ID: jacek.nykis@canonical.com-20150105161705-w544l1h5mcg7u4w9
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * plugin.js
 
3
 *
 
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
 
 
11
/*global tinymce:true */
 
12
 
 
13
tinymce.PluginManager.add('hr', function(editor) {
 
14
        editor.addCommand('InsertHorizontalRule', function() {
 
15
                editor.execCommand('mceInsertContent', false, '<hr />');
 
16
        });
 
17
 
 
18
        editor.addButton('hr', {
 
19
                icon: 'hr',
 
20
                tooltip: 'Horizontal line',
 
21
                cmd: 'InsertHorizontalRule'
 
22
        });
 
23
 
 
24
        editor.addMenuItem('hr', {
 
25
                icon: 'hr',
 
26
                text: 'Horizontal line',
 
27
                cmd: 'InsertHorizontalRule',
 
28
                context: 'insert'
 
29
        });
 
30
});