Contribute to this guide

guidePasting plain text

The plain text pasting feature is implemented by the PastePlainText plugin which is a part of the Clipboard plugin.

It detects the Ctrl/Cmd + Shift + V keystroke during the paste and causes the pasted text to inherit the styles of the content it was pasted into. In this sense, the feature can also be described as “pasting without formatting” — the source formatting of the pasted text gets replaced with the target formatting of the text it was pasted into.

Pasting plain text with a double line break will turn the break into a paragraph. A single line break will instead be turned into a soft break upon pasting.

This feature is enabled by default in all predefined builds.

# Demo

Paste plain text between the styled paragraphs below using the Ctrl/Cmd + Shift + V to test the style inheritance. Paste without the Shift modifier to retain unstyled text. You can copy this very paragraph or one from the demo for convenience.

On emphasis

In typography, emphasis is the strengthening of words in a text with a font in a different style from the rest of the text, to highlight them. This may include text in italics, bold, underlined or strikethrough words or whole paragraphs.

Italic type

Italic type is a cursive font based on a stylized form of calligraphic handwriting. Owing to the influence from calligraphy, italics normally slant slightly to the right. One manual of English usage described italics as "the print equivalent of underlining"; in other words, underscore in a manuscript directs a typesetter to use italic.

Italics are a way to emphasize key points in a printed text, to identify many types of creative works, to cite foreign words or phrases, or, when quoting a speaker, a way to show which words they stressed.

Bold type

A bold font weight makes the letters thicker than the surrounding text. It adds certain blackness to the type. Bold strongly stands out from the regular text, and is often used to highlight keywords important to the text content.

For example, printed dictionaries often use boldface for their keywords, and the names of entries can conventionally be marked in bold.

Underlined type

Professional Western typesetting usually does not employ lines under letters for emphasis within running text because it is considered too distracting.

Underlining is, however, often used with typewriters, in handwriting, and with some non-alphabetic scripts. It is also used for secondary emphasis, i.e. marks added by the reader and not the author.

CKEditor 5 supports a wider range of paste features, including:

  • Paste from Word – Paste content from Microsoft Word and maintain the original structure and formatting.
  • Paste from Google Docs – Paste content from Google Docs, maintaining the original formatting and structure.

# Installation

This feature is required by the clipboard plugin and is enabled by default in all predefined builds. The installation instructions are for developers interested in building their own custom rich-text editor.

To add this feature to your rich-text editor, install the @ckeditor/ckeditor5-clipboard package:

npm install --save @ckeditor/ckeditor5-clipboard

Then add the Clipboard plugin to your plugin list:

import Clipboard from '@ckeditor/ckeditor5-clipboard/src/clipboard';

ClassicEditor
    .create( document.querySelector( '#editor' ), {
        plugins: [ Clipboard, Bold, ... ]
    } )
    .then( ... )
    .catch( ... );

The PastePlainText plugin will activate along with the clipboard plugin.

# Support for other applications

You can find more information regarding compatibility with other applications in this ticket.

If you think that support for any of the applications needs improvements, please add 👍 and comments in the following issues:

Feel free to open a new feature request for other similar applications, too!