ckeditor/styles.js
author indvd00m (gotoindvdum[at]gmail[dot]com)
Thu, 15 Dec 2016 18:10:20 +0300
changeset 0 44d330dccc59
permissions -rw-r--r--
Init sample
indvd00m@0
     1
/**
indvd00m@0
     2
 * Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
indvd00m@0
     3
 * For licensing, see LICENSE.md or http://ckeditor.com/license
indvd00m@0
     4
 */
indvd00m@0
     5
indvd00m@0
     6
// This file contains style definitions that can be used by CKEditor plugins.
indvd00m@0
     7
//
indvd00m@0
     8
// The most common use for it is the "stylescombo" plugin which shows the Styles drop-down
indvd00m@0
     9
// list containing all styles in the editor toolbar. Other plugins, like
indvd00m@0
    10
// the "div" plugin, use a subset of the styles for their features.
indvd00m@0
    11
//
indvd00m@0
    12
// If you do not have plugins that depend on this file in your editor build, you can simply
indvd00m@0
    13
// ignore it. Otherwise it is strongly recommended to customize this file to match your
indvd00m@0
    14
// website requirements and design properly.
indvd00m@0
    15
//
indvd00m@0
    16
// For more information refer to: http://docs.ckeditor.com/#!/guide/dev_styles-section-style-rules
indvd00m@0
    17
indvd00m@0
    18
CKEDITOR.stylesSet.add( 'default', [
indvd00m@0
    19
	/* Block styles */
indvd00m@0
    20
indvd00m@0
    21
	// These styles are already available in the "Format" drop-down list ("format" plugin),
indvd00m@0
    22
	// so they are not needed here by default. You may enable them to avoid
indvd00m@0
    23
	// placing the "Format" combo in the toolbar, maintaining the same features.
indvd00m@0
    24
	/*
indvd00m@0
    25
	{ name: 'Paragraph',		element: 'p' },
indvd00m@0
    26
	{ name: 'Heading 1',		element: 'h1' },
indvd00m@0
    27
	{ name: 'Heading 2',		element: 'h2' },
indvd00m@0
    28
	{ name: 'Heading 3',		element: 'h3' },
indvd00m@0
    29
	{ name: 'Heading 4',		element: 'h4' },
indvd00m@0
    30
	{ name: 'Heading 5',		element: 'h5' },
indvd00m@0
    31
	{ name: 'Heading 6',		element: 'h6' },
indvd00m@0
    32
	{ name: 'Preformatted Text',element: 'pre' },
indvd00m@0
    33
	{ name: 'Address',			element: 'address' },
indvd00m@0
    34
	*/
indvd00m@0
    35
indvd00m@0
    36
	{ name: 'Italic Title',		element: 'h2', styles: { 'font-style': 'italic' } },
indvd00m@0
    37
	{ name: 'Subtitle',			element: 'h3', styles: { 'color': '#aaa', 'font-style': 'italic' } },
indvd00m@0
    38
	{
indvd00m@0
    39
		name: 'Special Container',
indvd00m@0
    40
		element: 'div',
indvd00m@0
    41
		styles: {
indvd00m@0
    42
			padding: '5px 10px',
indvd00m@0
    43
			background: '#eee',
indvd00m@0
    44
			border: '1px solid #ccc'
indvd00m@0
    45
		}
indvd00m@0
    46
	},
indvd00m@0
    47
indvd00m@0
    48
	/* Inline styles */
indvd00m@0
    49
indvd00m@0
    50
	// These are core styles available as toolbar buttons. You may opt enabling
indvd00m@0
    51
	// some of them in the Styles drop-down list, removing them from the toolbar.
indvd00m@0
    52
	// (This requires the "stylescombo" plugin.)
indvd00m@0
    53
	/*
indvd00m@0
    54
	{ name: 'Strong',			element: 'strong', overrides: 'b' },
indvd00m@0
    55
	{ name: 'Emphasis',			element: 'em'	, overrides: 'i' },
indvd00m@0
    56
	{ name: 'Underline',		element: 'u' },
indvd00m@0
    57
	{ name: 'Strikethrough',	element: 'strike' },
indvd00m@0
    58
	{ name: 'Subscript',		element: 'sub' },
indvd00m@0
    59
	{ name: 'Superscript',		element: 'sup' },
indvd00m@0
    60
	*/
indvd00m@0
    61
indvd00m@0
    62
	{ name: 'Marker',			element: 'span', attributes: { 'class': 'marker' } },
indvd00m@0
    63
indvd00m@0
    64
	{ name: 'Big',				element: 'big' },
indvd00m@0
    65
	{ name: 'Small',			element: 'small' },
indvd00m@0
    66
	{ name: 'Typewriter',		element: 'tt' },
indvd00m@0
    67
indvd00m@0
    68
	{ name: 'Computer Code',	element: 'code' },
indvd00m@0
    69
	{ name: 'Keyboard Phrase',	element: 'kbd' },
indvd00m@0
    70
	{ name: 'Sample Text',		element: 'samp' },
indvd00m@0
    71
	{ name: 'Variable',			element: 'var' },
indvd00m@0
    72
indvd00m@0
    73
	{ name: 'Deleted Text',		element: 'del' },
indvd00m@0
    74
	{ name: 'Inserted Text',	element: 'ins' },
indvd00m@0
    75
indvd00m@0
    76
	{ name: 'Cited Work',		element: 'cite' },
indvd00m@0
    77
	{ name: 'Inline Quotation',	element: 'q' },
indvd00m@0
    78
indvd00m@0
    79
	{ name: 'Language: RTL',	element: 'span', attributes: { 'dir': 'rtl' } },
indvd00m@0
    80
	{ name: 'Language: LTR',	element: 'span', attributes: { 'dir': 'ltr' } },
indvd00m@0
    81
indvd00m@0
    82
	/* Object styles */
indvd00m@0
    83
indvd00m@0
    84
	{
indvd00m@0
    85
		name: 'Styled Image (left)',
indvd00m@0
    86
		element: 'img',
indvd00m@0
    87
		attributes: { 'class': 'left' }
indvd00m@0
    88
	},
indvd00m@0
    89
indvd00m@0
    90
	{
indvd00m@0
    91
		name: 'Styled Image (right)',
indvd00m@0
    92
		element: 'img',
indvd00m@0
    93
		attributes: { 'class': 'right' }
indvd00m@0
    94
	},
indvd00m@0
    95
indvd00m@0
    96
	{
indvd00m@0
    97
		name: 'Compact Table',
indvd00m@0
    98
		element: 'table',
indvd00m@0
    99
		attributes: {
indvd00m@0
   100
			cellpadding: '5',
indvd00m@0
   101
			cellspacing: '0',
indvd00m@0
   102
			border: '1',
indvd00m@0
   103
			bordercolor: '#ccc'
indvd00m@0
   104
		},
indvd00m@0
   105
		styles: {
indvd00m@0
   106
			'border-collapse': 'collapse'
indvd00m@0
   107
		}
indvd00m@0
   108
	},
indvd00m@0
   109
indvd00m@0
   110
	{ name: 'Borderless Table',		element: 'table',	styles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } },
indvd00m@0
   111
	{ name: 'Square Bulleted List',	element: 'ul',		styles: { 'list-style-type': 'square' } },
indvd00m@0
   112
indvd00m@0
   113
	/* Widget styles */
indvd00m@0
   114
indvd00m@0
   115
	{ name: 'Clean Image', type: 'widget', widget: 'image', attributes: { 'class': 'image-clean' } },
indvd00m@0
   116
	{ name: 'Grayscale Image', type: 'widget', widget: 'image', attributes: { 'class': 'image-grayscale' } },
indvd00m@0
   117
indvd00m@0
   118
	{ name: 'Featured Snippet', type: 'widget', widget: 'codeSnippet', attributes: { 'class': 'code-featured' } },
indvd00m@0
   119
indvd00m@0
   120
	{ name: 'Featured Formula', type: 'widget', widget: 'mathjax', attributes: { 'class': 'math-featured' } },
indvd00m@0
   121
indvd00m@0
   122
	{ name: '240p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-240p' } },
indvd00m@0
   123
	{ name: '360p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-360p' } },
indvd00m@0
   124
	{ name: '480p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-480p' } },
indvd00m@0
   125
	{ name: '720p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-720p' } },
indvd00m@0
   126
	{ name: '1080p', type: 'widget', widget: 'embedSemantic', attributes: { 'class': 'embed-1080p' } },
indvd00m@0
   127
indvd00m@0
   128
	// Adding space after the style name is an intended workaround. For now, there
indvd00m@0
   129
	// is no option to create two styles with the same name for different widget types. See #16664.
indvd00m@0
   130
	{ name: '240p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-240p' } },
indvd00m@0
   131
	{ name: '360p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-360p' } },
indvd00m@0
   132
	{ name: '480p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-480p' } },
indvd00m@0
   133
	{ name: '720p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-720p' } },
indvd00m@0
   134
	{ name: '1080p ', type: 'widget', widget: 'embed', attributes: { 'class': 'embed-1080p' } }
indvd00m@0
   135
indvd00m@0
   136
] );
indvd00m@0
   137