|
|
@@ -4,6 +4,8 @@ category: features-pasting
|
|
|
order: 30
|
|
|
---
|
|
|
|
|
|
+{@snippet features/build-paste-source}
|
|
|
+
|
|
|
# Pasting plain text
|
|
|
|
|
|
The Paste from Word feature is provided through the {@link module:clipboard/clipboard~Clipboard} plugin), which is responsible for the integration with the native clipboard and intercepts all native events like `copy`, `cut` or `drop` and handles them on its side. The goal is to not allow the browser to touch the content in the rich text editor which would lead to the browser messing it up.
|
|
|
@@ -14,25 +16,28 @@ Pasting plain text with a double line break will turn it into a paragraph. This
|
|
|
|
|
|
## Demo
|
|
|
|
|
|
-To test how Paste from Office works, download the [sample Word document](../../assets/CKEditor5.PFO.Sample.Recognition_of_Achievement.docx), open it in Microsoft Word, copy the content, and paste it into CKEditor 5 below.
|
|
|
+Paste plain text between the styled paragraphs below using the <kbd>Ctrl</kbd>/<kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> to test the style inheritance. Paste without modifier to retain styleless text. You can copy this very paragraph for convenience.
|
|
|
+
|
|
|
+{@snippet features/paste-plaintext}
|
|
|
+
|
|
|
+## Related features
|
|
|
|
|
|
-{@snippet features/paste-from-office}
|
|
|
+CKEditor 5 supports a wider range of paste features, including:
|
|
|
+* {@link features/paste-from-word Paste from Word} – Allows you to paste content from Microsoft Word and maintain the original structure and formatting
|
|
|
+* {@link features/paste-from-google-docs Paste from Google Docs} – Allows you to paste content from Google Docs maintaining the original formatting and structure.
|
|
|
+* Raw HTML embedding – Lets you paste HTML source into the edited content and keep the output.
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
<info-box info>
|
|
|
- This feature is enabled by default in all official builds. The installation instructions are for developers interested in building their own custom rich-text editor.
|
|
|
+ This feature is enabled by default in all official builds. <!-- The installation instructions are for developers interested in building their own custom rich-text editor. -->
|
|
|
</info-box>
|
|
|
|
|
|
## Support for other applications
|
|
|
|
|
|
-At the current stage, the focus of the `@ckeditor/ckeditor5-paste-from-office` package is on supporting content that comes from Microsoft Word and {@link features/paste-from-google-docs Google Docs}. However, it does not mean that pasting from other similar applications (such as Microsoft Excel) is not supported.
|
|
|
-
|
|
|
-By default, CKEditor 5 will support pasting rich-text content from these applications, however, some styles and formatting may be lost, depending on the source application. Also, other minor bugs may appear.
|
|
|
-
|
|
|
You can find more information regarding compatibility with other applications in [this ticket](https://github.com/ckeditor/ckeditor5/issues/1184#issuecomment-409828069).
|
|
|
|
|
|
-If you think that support for any of the applications needs improvements, please add 👍 and comments in the following issues:
|
|
|
+If you think that support for any of the applications needs improvements, please add 👍 and comments in the following issues:
|
|
|
|
|
|
* [Support pasting from Excel](https://github.com/ckeditor/ckeditor5/issues/2513).
|
|
|
* [Support pasting from Libre Office](https://github.com/ckeditor/ckeditor5/issues/2520).
|