~ubuntu-branches/ubuntu/utopic/ldap-account-manager/utopic-proposed

« back to all changes in this revision

Viewing changes to templates/lib/extra/ckeditor/plugins/horizontalrule/plugin.js

  • Committer: Package Import Robot
  • Author(s): Roland Gruber
  • Date: 2014-06-12 17:51:20 UTC
  • mfrom: (1.2.24)
  • Revision ID: package-import@ubuntu.com-20140612175120-grobhwyk369g9aod
Tags: 4.6-1
new upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
 
3
 * For licensing, see LICENSE.md or http://ckeditor.com/license
 
4
 */
 
5
 
 
6
/**
 
7
 * @fileOverview Horizontal Rule plugin.
 
8
 */
 
9
 
 
10
( function() {
 
11
        var horizontalruleCmd = {
 
12
                canUndo: false, // The undo snapshot will be handled by 'insertElement'.
 
13
                exec: function( editor ) {
 
14
                        var hr = editor.document.createElement( 'hr' );
 
15
                        editor.insertElement( hr );
 
16
                },
 
17
 
 
18
                allowedContent: 'hr',
 
19
                requiredContent: 'hr'
 
20
        };
 
21
 
 
22
        var pluginName = 'horizontalrule';
 
23
 
 
24
        // Register a plugin named "horizontalrule".
 
25
        CKEDITOR.plugins.add( pluginName, {
 
26
                lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
 
27
                icons: 'horizontalrule', // %REMOVE_LINE_CORE%
 
28
                hidpi: true, // %REMOVE_LINE_CORE%
 
29
                init: function( editor ) {
 
30
                        if ( editor.blockless )
 
31
                                return;
 
32
 
 
33
                        editor.addCommand( pluginName, horizontalruleCmd );
 
34
                        editor.ui.addButton && editor.ui.addButton( 'HorizontalRule', {
 
35
                                label: editor.lang.horizontalrule.toolbar,
 
36
                                command: pluginName,
 
37
                                toolbar: 'insert,40'
 
38
                        } );
 
39
                }
 
40
        } );
 
41
} )();