ckeditor.styles.js 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  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 is used/requested by the 'Styles' button.
  7. * The 'Styles' button is not enabled by default in DrupalFull and DrupalFiltered toolbars.
  8. */
  9. if(typeof(CKEDITOR) !== 'undefined') {
  10. CKEDITOR.addStylesSet( 'drupal',
  11. [
  12. /* Block Styles */
  13. // These styles are already available in the "Format" drop-down list, so they are
  14. // not needed here by default. You may enable them to avoid placing the
  15. // "Format" drop-down list in the toolbar, maintaining the same features.
  16. /*
  17. { name : 'Paragraph' , element : 'p' },
  18. { name : 'Heading 1' , element : 'h1' },
  19. { name : 'Heading 2' , element : 'h2' },
  20. { name : 'Heading 3' , element : 'h3' },
  21. { name : 'Heading 4' , element : 'h4' },
  22. { name : 'Heading 5' , element : 'h5' },
  23. { name : 'Heading 6' , element : 'h6' },
  24. { name : 'Preformatted Text', element : 'pre' },
  25. { name : 'Address' , element : 'address' },
  26. */
  27. { name : 'Blue Title' , element : 'h3', styles : { 'color' : 'Blue' } },
  28. { name : 'Red Title' , element : 'h3', styles : { 'color' : 'Red' } },
  29. /* Inline Styles */
  30. // These are core styles available as toolbar buttons. You may opt enabling
  31. // some of them in the "Styles" drop-down list, removing them from the toolbar.
  32. /*
  33. { name : 'Strong' , element : 'strong', overrides : 'b' },
  34. { name : 'Emphasis' , element : 'em' , overrides : 'i' },
  35. { name : 'Underline' , element : 'u' },
  36. { name : 'Strikethrough' , element : 'strike' },
  37. { name : 'Subscript' , element : 'sub' },
  38. { name : 'Superscript' , element : 'sup' },
  39. */
  40. { name : 'Marker: Yellow' , element : 'span', styles : { 'background-color' : 'Yellow' } },
  41. { name : 'Marker: Green' , element : 'span', styles : { 'background-color' : 'Lime' } },
  42. { name : 'Big' , element : 'big' },
  43. { name : 'Small' , element : 'small' },
  44. { name : 'Typewriter' , element : 'tt' },
  45. { name : 'Computer Code' , element : 'code' },
  46. { name : 'Keyboard Phrase' , element : 'kbd' },
  47. { name : 'Sample Text' , element : 'samp' },
  48. { name : 'Variable' , element : 'var' },
  49. { name : 'Deleted Text' , element : 'del' },
  50. { name : 'Inserted Text' , element : 'ins' },
  51. { name : 'Cited Work' , element : 'cite' },
  52. { name : 'Inline Quotation' , element : 'q' },
  53. { name : 'Language: RTL' , element : 'span', attributes : { 'dir' : 'rtl' } },
  54. { name : 'Language: LTR' , element : 'span', attributes : { 'dir' : 'ltr' } },
  55. /* Object Styles */
  56. {
  57. name : 'Image on Left',
  58. element : 'img',
  59. attributes :
  60. {
  61. 'style' : 'padding: 5px; margin-right: 5px',
  62. 'border' : '2',
  63. 'align' : 'left'
  64. }
  65. },
  66. {
  67. name : 'Image on Right',
  68. element : 'img',
  69. attributes :
  70. {
  71. 'style' : 'padding: 5px; margin-left: 5px',
  72. 'border' : '2',
  73. 'align' : 'right'
  74. }
  75. }
  76. ]);
  77. }