]>
git.immae.eu Git - perso/Immae/Projets/packagist/ludivine-ckeditor-component.git/blob - sources/plugins/liststyle/plugin.js
2 * @license Copyright (c) 2003-2017, 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,az,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,oc,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]; li{list-style-type}[value]',
21 contentTransformations: [
22 [ 'ol: listTypeToStyle' ]
25 cmd
= editor
.addCommand( 'numberedListStyle', def
);
26 editor
.addFeature( cmd
);
27 CKEDITOR
.dialog
.add( 'numberedListStyle', this.path
+ 'dialogs/liststyle.js' );
29 def
= new CKEDITOR
.dialogCommand( 'bulletedListStyle', {
30 requiredContent: 'ul',
31 allowedContent: 'ul{list-style-type}',
32 contentTransformations: [
33 [ 'ul: listTypeToStyle' ]
36 cmd
= editor
.addCommand( 'bulletedListStyle', def
);
37 editor
.addFeature( cmd
);
38 CKEDITOR
.dialog
.add( 'bulletedListStyle', this.path
+ 'dialogs/liststyle.js' );
41 editor
.addMenuGroup( 'list', 108 );
43 editor
.addMenuItems( {
45 label: editor
.lang
.liststyle
.numberedTitle
,
47 command: 'numberedListStyle'
50 label: editor
.lang
.liststyle
.bulletedTitle
,
52 command: 'bulletedListStyle'
56 editor
.contextMenu
.addListener( function( element
) {
57 if ( !element
|| element
.isReadOnly() )
61 var name
= element
.getName();
63 return { numberedlist: CKEDITOR
.TRISTATE_OFF
};
64 else if ( name
== 'ul' )
65 return { bulletedlist: CKEDITOR
.TRISTATE_OFF
};
67 element
= element
.getParent();
74 CKEDITOR
.plugins
.add( 'liststyle', CKEDITOR
.plugins
.liststyle
);