Contribute to this guide

guidePasting content from Microsoft Word

The Paste from Word feature is provided through the PasteFromOffice plugin.

This feature allows you to paste content from Microsoft Word and maintain the original structure and formatting. After creating a document in Microsoft Word you can simply copy it to CKEditor and retain basic text styling, heading levels, links, lists, tables and images.

When the plugin is enabled, it automatically detects Word content and transforms its structure and formatting to clean HTML which is then transformed into semantic content by the editor.

The Paste from Office plugin only preserves content formatting and structures that are included in your CKEditor 5 build. This means that you may need to add missing features such as font color or text alignment to your build. Read more in the Automatic content filtering section below.

# Demo

To test how Paste from Office works, download the sample Word document, open it in Microsoft Word, copy the content and paste it into CKEditor 5 below.

Recognition of Achievement

This letter acknowledges the invaluable input you, as a member of our Innovation Team, have provided in the “Implement Rich Text Editor” project. 

  • Paste from Office feature,
  • Tracking changes feature,
  • Comments feature.

The Management would like to hereby thank you for this great accomplishment that was delivered in a timely fashion, up to the highest company standards, and with great results:

Project Phase



Phase 1: Market research


Phase 2: Editor implementation


Phase 3: Rollout to Production


The project that you participated in is of utmost importance to the future success of our platform. We are very proud to share that the CKEditor implementation was a huge success and brought congratulations from both the key Stakeholders and the Customers:

This new editor has totally changed our content creation experience!

— John F. Smith, CEO, The New Web

This letter recognizes that much of our success is directly attributable to your efforts. You deserve to be proud of your achievement. May your future efforts be equally successful and rewarding.

I am sure we will be seeing and hearing a great deal more about your accomplishments in the future. Keep up the good work!


Best regards,

The Management

# Automatic content filtering

With CKEditor 5 you do not need to worry about pasting messy content from Microsoft Word (or any other possible sources). Thanks to the CKEditor 5 custom data model, only content which is specifically handled by the loaded rich-text editor features will be preserved.

This means that if you did not enable, for instance, font family and font size features, this sort of formatting will be automatically stripped off when you paste content from Microsoft Word and other sources (e.g. other websites).

# Installation

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.

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

npm install --save @ckeditor/ckeditor5-paste-from-office

Then add the PasteFromOffice plugin to your plugin list:

import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';

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

# Support for other office applications

At the current stage, the focus of the @ckeditor/ckeditor5-paste-from-office package is on supporting content that comes from Microsoft Word. However, it does not mean that pasting from other office applications (such as Microsoft Excel or Google Docs) 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.

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

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