Docs
Serializing Docx

Serializing Docx

Copy paste from DOCX to Slate.

Deserialize Docx

Easily import content from Microsoft Word documents by simply copying and pasting the Docx content into the editor.

Features

  • Convert DOCX content to a Slate value.

Installation

npm install @udecode/plate-serializer-docx @udecode/plate-juice

Usage

DOCX -> Slate

import { createJuicePlugin } from '@udecode/plate-juice';
import { createDeserializeDocxPlugin } from '@udecode/plate-serializer-docx';
 
const plugins = [
  // ...otherPlugins,
  createDeserializeDocxPlugin(),
  createJuicePlugin(),
];

Given pasted HTML, @udecode/plate-juice is used to inline CSS properties into the style attribute.

API

createDeserializeDocxPlugin