Styling"

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

(Links to subpages added)
(Subscript and Superscript link joined)
Line 7: Line 7:
 
* [[CKEditor_3.x/Users Guide/Common Tasks/Text Styling/Text Color|Text Color]]
 
* [[CKEditor_3.x/Users Guide/Common Tasks/Text Styling/Text Color|Text Color]]
 
* [[CKEditor_3.x/Users Guide/Common Tasks/Text Styling/Background Color|Background Color]]
 
* [[CKEditor_3.x/Users Guide/Common Tasks/Text Styling/Background Color|Background Color]]
* [[CKEditor_3.x/Users Guide/Common Tasks/Text Styling/Subscript|Subscript]]
+
* [[CKEditor_3.x/Users Guide/Common Tasks/Text Styling/Subscript and Superscript|Subscript and Superscript]]
* [[CKEditor_3.x/Users Guide/Common Tasks/Text Styling/Superscript|Superscript]]
 
 
* [[CKEditor_3.x/Users Guide/Common Tasks/Text Styling/Styles|Styles]]
 
* [[CKEditor_3.x/Users Guide/Common Tasks/Text Styling/Styles|Styles]]
 
* [[CKEditor_3.x/Users Guide/Common Tasks/Text Styling/Paragraph Format|Paragraph Format]]
 
* [[CKEditor_3.x/Users Guide/Common Tasks/Text Styling/Paragraph Format|Paragraph Format]]
  
  
== Font ==
 
In CKEditor the '''Font''' is the typeface that will be applied to the document text. Fonts are pre-defined sets of characters with uniform styling collected under one name. The CKEditor collection of fonts includes most popular [http://en.wikipedia.org/wiki/Serif serif fonts] (Times New Roman, Georgia), [http://en.wikipedia.org/wiki/Sans_serif sans-serif fonts] (Arial, Verdana, Tahoma), and [http://en.wikipedia.org/wiki/Monospaced_font monospaced fonts] (Courier New).
 
 
To change a font for a text fragment, open the '''Font''' menu by clicking the [[Image:CKEditor_font.png|Font]] button on the toolbar. The font drop-down list contains a number of typefaces that you can use. To make the choice easier, the font names are displayed in a font that they represent, giving you a preview of what the text will look like.
 
 
[[Image:CKEditor_font_menu.png|frame|center|Font drop-down menu in CKEditor]]
 
 
 
A font can be applied to the whole document, a paragraph, or a text fragment of arbitrary length — even a single letter. Do note, however, that for esthetic reasons it is recommended not to combine too many different fonts in one document.
 
 
[[Image:CKEditor_font_example.png|frame|center|Different fonts used in CKEditor]]
 
 
 
== Size ==
 
In CKEditor the '''Size''' determines how big or small a font used in the document text will be. The system administrator may customize the set of font sizes to the needs of a particular CKEditor installation, however, by default the following values are available: <code>8px</code>, <code>9px</code>, <code>10px</code>, <code>11px</code>, <code>12px</code>, <code>14px</code>, <code>16px</code>, <code>18px</code>, <code>20px</code>, <code>22px</code>, <code>24px</code>, <code>26px</code>, <code>28px</code>, <code>36px</code>, <code>48px</code> and <code>72px</code>. Depending on the needs of the system, font sizes may also be defined in a descriptive manner, like <code>Very small</code> or <code>Bigger</code>.
 
 
To change a font size for a text fragment, open the '''Size''' menu by clicking the [[Image:CKEditor_size.png|Size]] button on the toolbar. The font size drop-down list contains a number of sizes that you can use. To make the choice easier, the items of the list are displayed in a font size that they represent, giving you a preview of what the text will look like.
 
 
[[Image:CKEditor_size_menu.png|frame|center|Font size drop-down menu in CKEditor]]
 
 
 
A font size can be applied to the whole document, a paragraph, or a text fragment of arbitrary length &mdash; even a single letter. Do note, however, that for esthetic reasons it is recommended not to combine too many different font sizes in one document.
 
 
[[Image:CKEditor_size_example.png|frame|center|Different font sizes used in CKEditor]]
 
 
 
== Bold, Italic, Underline, and Strike-through ==
 
These four basic font styles are frequently used in both print and online documents. Due to their popularity each one of them is available under a separate toolbar button. To turn the style on, press the button or use the respective keyboard shortcut. To turn it off, use the button or a keyboard shortcut again.
 
 
To write in bold (i.e. using thicker letters), press the [[Image:CKEditor_bold.png|Bold]] toolbar button or use the ''Ctrl+B'' keyboard shortcut.
 
 
To write in italics (i.e. using slanted letters), press the [[Image:CKEditor_italic.png|Italic]] toolbar button or use the ''Ctrl+I'' keyboard shortcut.
 
 
To underline the text (i.e. draw a horizontal line underneath the letters), press the [[Image:CKEditor_underline.png|Underline]] toolbar button or use the ''Ctrl+U'' keyboard shortcut. Remember that the underline style will also be applied to all white space of the selected fragment.
 
 
To strike the text through (i.e. draw a horizontal line through the letters), press the [[Image:CKEditor_strikethrough.png|Strike Through]] toolbar button. Remember that the strike-through style will also be applied to all white space of the selected fragment.
 
 
The bold, italics, underline and strike-through styles can be applied to the whole document, a paragraph, or a text fragment of arbitrary length &mdash; even a single letter. Do note, however, that for esthetic reasons it is recommended not to combine too many different formatting styles in one document.
 
 
[[Image:CKEditor_bold_italics_underline_strikethrough_example1.png|frame|center|Bold, italics, underline, and strike-through used in CKEditor]]
 
 
 
In CKEditor it is possible to combine these styles or use them in conjunction with other formatting methods. It is worth remembering, however, that bold, italics, underline, and strike-through often have special meaning. Strike-through, for example, is often employed to denote the recently deleted text, while underline may suggest recently inserted text or a link. Since their usage is partly standardized, it is important to use these styles consistently across your documents.
 
 
[[Image:CKEditor_bold_italics_underline_strikethrough_example2.png|frame|center|Bold, italics, underline, and strike-through combined in CKEditor]]
 
 
 
== Text Color ==
 
CKEditor allows you to change the color of text in your documents by using a color palette. To choose a color, select a text fragment and press the [[Image:CKEditor_textcolor.png|Text Color]] toolbar button. The '''Text Color''' drop-down menu that will open lets you select a color from a basic palette of 40 shades.
 
 
[[Image:CKEditor_textcolor_menu.png|frame|center|Text Color drop-down menu in CKEditor]]
 
 
If the color that you are after is not included in the basic palette, click the '''More Colors''' option in the drop-down menu. The '''Select color''' dialog window that will open lets you choose a color from an extended palette. You can either select a desired shade with your mouse or enter the RGB color value into the text box, using one of the following formats:
 
* <code>rgb(''nn'', ''nn'', ''nn'')</code> format, where <code>''nn''</code> is a numeric value on a scale from 0 to 255 representing the red, green and blue channel.
 
* <code>#''nnnnnn''</code> format, where the <code>''n''</code> letters stand for the three pairs of hex color values representing the red, green and blue channel.
 
 
[[Image:CKEditor_select_color.png|frame|center|Select Color dialog window in CKEditor]]
 
 
 
A color can be applied to the whole document, a paragraph, or a text fragment of arbitrary length &mdash; even a single letter. Do note, however, that for esthetic reasons it is recommended not to combine too many different colors in one document.
 
 
[[Image:CKEditor_textcolor_example.png|frame|center|Text color used in CKEditor]]
 
 
 
== Background Color ==
 
CKEditor allows you to change the color of text background in your documents by using a color palette. To choose a color, select a text fragment and press the [[Image:CKEditor_backgroundcolor.png|Background Color]] toolbar button. The '''Background Color''' drop-down menu that will open lets you select a color from a basic palette of 40 shades.
 
 
[[Image:CKEditor_backgroundtcolor_menu.png|frame|center|Background Color drop-down menu in CKEditor]]
 
 
If the color that you are after is not included in the basic palette, click the '''More Colors''' option in the drop-down menu. The '''Select color''' dialog window that will open lets you choose a color from an extended palette. You can either select a desired shade with your mouse or enter the RGB color value into the text box, using one of the following formats:
 
* <code>rgb(''nn'', ''nn'', ''nn'')</code> format, where <code>''nn''</code> is a numeric value on a scale from 0 to 255 representing the red, green and blue channel.
 
* <code>#''nnnnnn''</code> format, where the <code>''n''</code> letters stand for the three pairs of hex color values representing the red, green and blue channel.
 
 
[[Image:CKEditor_select_color.png|frame|center|Select Color dialog window in CKEditor]]
 
 
 
A color can be applied to the background  of the whole document, a paragraph, or a text fragment of arbitrary length &mdash; even a single letter. Do note, however, that for esthetic reasons it is recommended not to combine too many different colors in one document.
 
 
[[Image:CKEditor_backgroundcolor_example.png|frame|center|Background color used in CKEditor]]
 
  
  

Revision as of 10:48, 19 November 2010

Text formatting determines the way your text will look in the document. Advanced capabilities in editing text format is what distinguishes CKEditor from a standard website form text area or a basic editor. Font styling, changing the size of the text, its size and color, or applying a pre-defined set of consistent styles all happen within seconds, with one mouse click. Experiment with various CKEditor text formatting options to achieve a unique presentation of your documents.



Subscript

Subscript is a character that is slightly smaller than the text that surrounds it and is set below the baseline. It is often used in mathematical expressions to denote a variable version or the denominator part of a fraction.

To use subscript in your document, press the Subscript toolbar button. To remove the formatting, press the button again.

Subscript used in CKEditor


Superscript

Subscript is a character that is slightly smaller than the text that surrounds it and is set above the baseline. It is often used in mathematical expressions to denote power or the numerator part of a fraction. In normal text superscript often directs a user to a footnote; some special characters are often added as superscript by default.


To use superscript in your document, press the Superscript toolbar button. To remove the formatting, press the button again.

Superscript used in CKEditor


Styles

Styles are pre-defined combinations of various formatting options that make it easier to keep the presentation of the text uniform. What is more, since a style often contains a number of features at once, when you want to customize the way a text fragment looks, you do not need to change a font, its size, or text and background color separately.

To choose a style, select a text fragment and press the Styles toolbar button. The Styles drop-down list contains a number of pre-defined block and inline styles that you can use. To make the choice easier, the style names are displayed in a style that they represent, giving you a preview of what the text will look like.

Styles drop-down menu in CKEditor


A style can be applied to the whole document, a paragraph, or a text fragment of arbitrary length — even a single letter. Do note, however, that for esthetic reasons it is recommended not to combine too many different styles in one document and to keep the styling consistent.

Styles used in CKEditor


Paragraph Format

Paragraph formats are pre-defined block-level combinations of various formatting options that make it easier to keep the presentation of the text uniform. What is more, since a style often contains a number of features at once, when you want to customize the way a text fragment looks, you do not need to change a font, its size, or text and background color separately.

To choose a paragraph format, place the cursor inside the block-level element and press the Paragraph Format toolbar button. The Paragraph Format drop-down list contains a number of pre-defined block-level styles that you can use. To make the choice easier, the format names are displayed in a format that they represent, giving you a preview of what the text will look like.

Paragraph Format drop-down menu in CKEditor


Note, however, that a paragraph format can only be applied to a block-level element, like a paragraph or a div element. To change the appearance of a text fragment of arbitrary length, even a single letter, choose an inline style via the Styles feature of CKEditor. Do note, however, that for esthetic reasons it is recommended not to combine too many different styles and formats in one document and to keep the styling consistent.

Paragraph Format used in CKEditor