• Jodit
  • PRO
  • Builder
  • Getting Started
  • Playground
  • Examples
  • Documentation
  • Download
  • Overview
  • Issue tracker
  • Docs
  • Plugins
  • Demo
  • Pricing
  • File Browser Pro
  • Sign in
Get connected wth us on social networks!

Footer

Jodit Core

  • Jodit Home page
  • Documentation
  • Playground
  • Examples
  • Github
  • Issues

Integration

  • Jodit React
  • Jodit Angular
  • Jodit Vue
  • Jodit Yii2
  • Jodit Joomla

PRO/OEM plugins

  • AutoComplete
  • Backup Plugin
  • Button Generator
  • Change case
  • Custom Color Picker
  • Emoji
  • Finder
  • Google Search
  • Paste code
  • Show Blocks
  • Virtual Keyboard
  • Tune block
  • Highlight signature
  • Google Maps Editor
  • Export in PDF
  • Page Break
  • Iframe Editor
  • Paste from Word PRO
  • Mobile View
  • ToDo List
  • Translate

Links

  • Demo PRO/OEM
  • Demo FileBrowser PRO
  • Price
  • License
  • Support
  • For resellers

Versions

  • site v.0.1.823
  • Jodit PRO v.4.6.9
  • Jodit v.4.6.2
  • All versions
2025 © Copyright: XDSoft.net <support@xdsoft.net>
  • Getting started

    • Installation
    • Usage
    • Support
    • FAQs
    • Cloud
    • Examples
  • How to

    • Create plugin
    • Add custom button
    • Add custom font in the font list
    • How to create module
    • How to generate license key
    • How to make a backend finder
    • How to set up document view
  • Modes

    • Source mode
  • Customisation

    • Theme
    • Keyboard
  • API

    • License Rest API
    • JS API
  • Changelog

  • Plugins

    • AutoComplete
    • Backup Plugin
    • Button Generator
    • Change case
    • Custom Color Picker
    • Emoji
    • Finder
    • Google Search
    • Paste code
    • Show Blocks
    • Virtual Keyboard
    • Tune block
    • Highlight signature
    • Google Maps Editor
    • Export in PDF
    • Page Break
    • Iframe Editor
    • Paste from Word PRO
    • Mobile View
    • ToDo List
    • Translate

PRO HTML Paste Processing Plugin from MSWord

Users paste a lot from Word and Excel. Jodit HTML Editor cleans up all unnecessary code and makes HTML just beautiful.

This plugin provides enhanced functionality for pasting content from Microsoft Word and Excel, ensuring clean and properly formatted HTML output.

Options

pasteFromWord.enable

  • Type: boolean
  • Default: false

Enables or disables the paste from Word processing functionality. By default, this feature is disabled and needs to be explicitly enabled.

Jodit.make('#editor', { pasteFromWord: { enable: true } });
Copy

pasteFromWord.convertUnitsToPixel

  • Type: boolean
  • Default: false

When enabled, this option converts all units (cm, pt, etc.) to pixels in the pasted content.

Jodit.make('#editor', { pasteFromWord: { enable: true, convertUnitsToPixel: true } });
Copy

pasteFromWord.allowedStyleProps

  • Type: string[]
  • Default: See below

A list of CSS style properties that will be preserved when pasting from Word. All other style properties will be removed.

Default value:

[ 'background', 'background-color', 'border', 'border-.*', 'color', 'float', 'font-family', 'font-size', 'font-style', 'font-weight', 'height', 'line-height', 'list-style-type', 'margin', 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'padding', 'text-align', 'text-justify', 'text-decoration', 'text-indent', 'vertical-align', 'width' ]
Copy

You can customize this list to allow only specific style properties:

Jodit.make('#editor', { pasteFromWord: { enable: true, allowedStyleProps: [ 'color', 'font-weight', 'text-align' ] } });
Copy

Usage Examples

Basic Usage

Jodit.make('#editor', { pasteFromWord: { enable: true, convertUnitsToPixel: true } });
Copy

Customized Style Properties

Jodit.make('#editor', { pasteFromWord: { enable: true, convertUnitsToPixel: true, allowedStyleProps: [ 'background-color', 'color', 'font-family', 'font-size', 'font-weight', 'text-align', 'text-decoration' ] } });
Copy

Disabling the Plugin

To completely disable the plugin:

Jodit.make('#editor', { disablePlugins: ['pasteFromWordPro'] });
Copy

Integration with Core Jodit Options

The plugin works in combination with the following core Jodit options:

askBeforePasteFromWord

  • Type: boolean
  • Default: true

When enabled, Jodit will show a dialog asking how to paste content from Word.

defaultActionOnPaste / defaultActionOnPasteFromWord

  • Type: number
  • Default: Jodit.INSERT_AS_HTML

Determines the default action when pasting content.

Example of integration with core options:

Jodit.make('#editor', { askBeforePasteFromWord: false, pasteFromWord: { enable: true, convertUnitsToPixel: true }, beautifyHTML: false, defaultActionOnPaste: Jodit.INSERT_AS_HTML });
Copy

Styles for Nested Lists

In order for the counters to work correctly with nested lists (e.g., 1, 1.1, 1.2), you must include the following CSS in your stylesheet:

ul ol[data-list-style-type='decimal'], ol ol[data-list-style-type='decimal'] { counter-reset: item; } ol ol[data-list-style-type='decimal'] > li, ul ol[data-list-style-type='decimal'] > li { display: block; } ol ol[data-list-style-type='decimal'] > li:before, ul ol[data-list-style-type='decimal'] > li:before { content: counters(item, '.') '. '; counter-increment: item; }
Copy

This CSS ensures that nested lists are properly formatted with hierarchical numbering.

How It Works

  1. When content is pasted from Word, the plugin detects it based on specific markers in the HTML
  2. The plugin then processes the content, removing unnecessary markup and preserving only the allowed style properties
  3. If convertUnitsToPixel is enabled, all units (cm, pt, etc.) are converted to pixels
  4. Special handling is applied for lists, tables, and other complex structures
  5. The cleaned HTML is then inserted into the editor

This process ensures that content pasted from Word is clean, consistent, and properly formatted according to your specifications.

Demo

COURSE NAME

REPORT TITLE

LOREM IPSUM DOLOR SIT AMET

Lorem ipsum

Introduction

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan.

Lorem ipsum

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

Dolor sit amet

Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan.