]>
git.immae.eu Git - perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git/blob - sources/plugins/liststyle/plugin.js
2 * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
7 CKEDITOR
.plugins
.liststyle
= {
8 requires: 'dialog,contextmenu',
9 // jscs:disable maximumLineLength
10 lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,de-ch,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,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
11 // jscs:enable maximumLineLength
12 init: function( editor
) {
13 if ( editor
.blockless
)
18 def
= new CKEDITOR
.dialogCommand( 'numberedListStyle', {
19 requiredContent: 'ol',
20 allowedContent: 'ol{list-style-type}[start]'
22 cmd
= editor
.addCommand( 'numberedListStyle', def
);
23 editor
.addFeature( cmd
);
24 CKEDITOR
.dialog
.add( 'numberedListStyle', this.path
+ 'dialogs/liststyle.js' );
26 def
= new CKEDITOR
.dialogCommand( 'bulletedListStyle', {
27 requiredContent: 'ul',
28 allowedContent: 'ul{list-style-type}'
30 cmd
= editor
.addCommand( 'bulletedListStyle', def
);
31 editor
.addFeature( cmd
);
32 CKEDITOR
.dialog
.add( 'bulletedListStyle', this.path
+ 'dialogs/liststyle.js' );
35 editor
.addMenuGroup( 'list', 108 );
37 editor
.addMenuItems( {
39 label: editor
.lang
.liststyle
.numberedTitle
,
41 command: 'numberedListStyle'
44 label: editor
.lang
.liststyle
.bulletedTitle
,
46 command: 'bulletedListStyle'
50 editor
.contextMenu
.addListener( function( element
) {
51 if ( !element
|| element
.isReadOnly() )
55 var name
= element
.getName();
57 return { numberedlist: CKEDITOR
.TRISTATE_OFF
};
58 else if ( name
== 'ul' )
59 return { bulletedlist: CKEDITOR
.TRISTATE_OFF
};
61 element
= element
.getParent();
68 CKEDITOR
.plugins
.add( 'liststyle', CKEDITOR
.plugins
.liststyle
);