国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 lines
5.4KB

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