Administrator
2022-09-14 58d006e05dcf2a20d0ec5367dd03d66a61db6849
提交 | 用户 | 时间
58d006 1 /**
A 2  * Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3  * For licensing, see LICENSE.html or http://ckeditor.com/license
4  */
5
6 // This file contains style definitions that can be used by CKEditor plugins.
7 //
8 // The most common use for it is the "stylescombo" plugin, which shows a combo
9 // in the editor toolbar, containing all styles. Other plugins instead, like
10 // the div plugin, use a subset of the styles on their feature.
11 //
12 // If you don't have plugins that depend on this file, you can simply ignore it.
13 // Otherwise it is strongly recommended to customize this file to match your
14 // website requirements and design properly.
15
16 CKEDITOR.stylesSet.add( 'default', [
17     /* Block Styles */
18
19     // These styles are already available in the "Format" combo ("format" plugin),
20     // so they are not needed here by default. You may enable them to avoid
21     // placing the "Format" combo in the toolbar, maintaining the same features.
22     /*
23     { name: 'Paragraph',        element: 'p' },
24     { name: 'Heading 1',        element: 'h1' },
25     { name: 'Heading 2',        element: 'h2' },
26     { name: 'Heading 3',        element: 'h3' },
27     { name: 'Heading 4',        element: 'h4' },
28     { name: 'Heading 5',        element: 'h5' },
29     { name: 'Heading 6',        element: 'h6' },
30     { name: 'Preformatted Text',element: 'pre' },
31     { name: 'Address',            element: 'address' },
32     */
33
34     { name: 'Italic Title',        element: 'h2', styles: { 'font-style': 'italic' } },
35     { name: 'Subtitle',            element: 'h3', styles: { 'color': '#aaa', 'font-style': 'italic' } },
36     {
37         name: 'Special Container',
38         element: 'div',
39         styles: {
40             padding: '5px 10px',
41             background: '#eee',
42             border: '1px solid #ccc'
43         }
44     },
45
46     /* Inline Styles */
47
48     // These are core styles available as toolbar buttons. You may opt enabling
49     // some of them in the Styles combo, removing them from the toolbar.
50     // (This requires the "stylescombo" plugin)
51     /*
52     { name: 'Strong',            element: 'strong', overrides: 'b' },
53     { name: 'Emphasis',            element: 'em'    , overrides: 'i' },
54     { name: 'Underline',        element: 'u' },
55     { name: 'Strikethrough',    element: 'strike' },
56     { name: 'Subscript',        element: 'sub' },
57     { name: 'Superscript',        element: 'sup' },
58     */
59
60     { name: 'Marker: Yellow',    element: 'span', styles: { 'background-color': 'Yellow' } },
61     { name: 'Marker: Green',    element: 'span', styles: { 'background-color': 'Lime' } },
62
63     { name: 'Big',                element: 'big' },
64     { name: 'Small',            element: 'small' },
65     { name: 'Typewriter',        element: 'tt' },
66
67     { name: 'Computer Code',    element: 'code' },
68     { name: 'Keyboard Phrase',    element: 'kbd' },
69     { name: 'Sample Text',        element: 'samp' },
70     { name: 'Variable',            element: 'var' },
71
72     { name: 'Deleted Text',        element: 'del' },
73     { name: 'Inserted Text',    element: 'ins' },
74
75     { name: 'Cited Work',        element: 'cite' },
76     { name: 'Inline Quotation',    element: 'q' },
77
78     { name: 'Language: RTL',    element: 'span', attributes: { 'dir': 'rtl' } },
79     { name: 'Language: LTR',    element: 'span', attributes: { 'dir': 'ltr' } },
80
81     /* Object Styles */
82
83     {
84         name: 'Styled image (left)',
85         element: 'img',
86         attributes: { 'class': 'left' }
87     },
88
89     {
90         name: 'Styled image (right)',
91         element: 'img',
92         attributes: { 'class': 'right' }
93     },
94
95     {
96         name: 'Compact table',
97         element: 'table',
98         attributes: {
99             cellpadding: '5',
100             cellspacing: '0',
101             border: '1',
102             bordercolor: '#ccc'
103         },
104         styles: {
105             'border-collapse': 'collapse'
106         }
107     },
108
109     { name: 'Borderless Table',        element: 'table',    styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } },
110     { name: 'Square Bulleted List',    element: 'ul',        styles: { 'list-style-type': 'square' } }
111 ]);
112