CKEditor paste from Word: preserve the document structures your editor supports

If a Word heading or numbered list changes after pasting into CKEditor 5, check both PasteFromOffice and the editor features that represent that content. The paste plugin recognizes Office content, but the editor retains only structures and formatting supported by its configuration. A paste operation also differs from uploading a .docx file for conversion. Paste from Office

A useful original test document is a library volunteer briefing: a heading, the sentence “Return the blue key before closing,” a two-step numbered list, and a two-column table of desk assignments. Preserving the list order and assignment relationships matters more than reproducing Word's page margins.

Start with a small Word document

Create the briefing in the actual Word application your authors use. Apply a real heading style, make “blue key” bold, and create the numbered list with Word's list control. Copy that content and paste into a development instance of your editor using the normal paste command.

Do not start by copying from a browser's rendered HTML version or pasting as plain text. Those routes can provide different clipboard content and obscure whether the Office-specific path is working.

After pasting, inspect these independent results:

Briefing content What to inspect
Heading Remains an editable heading at the intended level
Blue-key sentence Words survive and the selected phrase retains emphasis
Numbered instructions Two ordered items remain in the correct sequence
Desk table Each desk remains associated with its assigned volunteer

Then read the exported data. Similar-looking text can hide a flattened list or lost table relationship.

Add the feature that owns the missing structure

For a current package-based CKEditor 5 installation, the documented paste feature is imported from ckeditor5:

import { PasteFromOffice } from 'ckeditor5';

// Add PasteFromOffice to the existing editor's plugins array.
// Keep the heading, list, table, and formatting plugins it needs.

This is an integration fragment, not a complete editor initialization. Follow the installation instructions for your release, including styles and its applicable license configuration. CKEditor 4 examples and old predefined-build snippets use different integration patterns.

If the list is lost, inspect the installed list feature. If the table is lost, inspect table support. Missing font color can similarly reflect an absent font-color feature. Adding a paste button or allowing arbitrary HTML is not a substitute for representing the content in the editor model.

The source editing guide addresses the related case in which markup disappears during a visual/source round trip. Word paste adds another input boundary: the clipboard must first contain the data needed for the feature to interpret.

Separate basic paste, enhanced paste, and file import

CKEditor documents a basic open-source PasteFromOffice feature and a premium PasteFromOfficeEnhanced feature. The enhanced feature supports additional Office formatting; its documentation distinguishes formatting applied directly in Word from formatting inherited through Word styles. It still needs the corresponding editor content support and appropriate activation. Enhanced paste capabilities

Use the support table for the particular formatting authors require. Do not choose a feature solely because its demo resembles a Word page, and do not promise exact reproduction of a whole document from a successful paragraph paste.

If the actual requirement is “choose a .docx file and import it,” assess CKEditor's separate Import from Word feature. Copying a selection through the clipboard and converting an uploaded document have different inputs and integration requirements.

Diagnose a missing image separately

CKEditor's paste documentation identifies combinations of Word versions, operating systems, and browsers where a selection containing text and images does not expose the image data correctly. Try copying the image separately, then inspect the application's image support and upload path. A text heading surviving does not establish that the clipboard supplied usable image data.

For the volunteer briefing, save and reopen the document through the real application. Read the ordered instructions and desk assignments in the publication renderer, where the next volunteer will use them. Keep the Word original until those relationships and the blue-key instruction have survived the full transfer.

Keep reading