@ckeditor/ckeditor5-paste-from-office

  • Version 41.3.1
  • Published
  • 91.3 kB
  • 1 dependency
  • GPL-2.0-or-later license

Install

npm i @ckeditor/ckeditor5-paste-from-office
yarn add @ckeditor/ckeditor5-paste-from-office
pnpm add @ckeditor/ckeditor5-paste-from-office

Overview

Paste from Office feature for CKEditor 5.

Index

Functions

function parseHtml

parseHtml: (
htmlString: string,
stylesProcessor: StylesProcessor
) => ParseHtmlResult;
  • Parses the provided HTML extracting contents of <body> and <style> tags.

    Parameter htmlString

    HTML string to be parsed.

Classes

class MSWordNormalizer

class MSWordNormalizer implements Normalizer {}
  • Normalizer for the content pasted from Microsoft Word.

constructor

constructor(document: ViewDocument, hasMultiLevelListPlugin?: boolean);
  • Creates a new MSWordNormalizer instance.

    Parameter document

    View document.

property document

readonly document: ViewDocument;

    property hasMultiLevelListPlugin

    readonly hasMultiLevelListPlugin: boolean;

      method execute

      execute: (data: NormalizerData) => void;

      method isActive

      isActive: (htmlString: string) => boolean;

      class PasteFromOffice

      class PasteFromOffice extends Plugin {}
      • The Paste from Office plugin.

        This plugin handles content pasted from Office apps and transforms it (if necessary) to a valid structure which can then be understood by the editor features.

        Transformation is made by a set of predefined . This plugin includes following normalizers: * *

        For more information about this feature check the .

      property pluginName

      static readonly pluginName: string;

      property requires

      static readonly requires: readonly [any];

      method init

      init: () => void;

      Interfaces

      interface Normalizer

      interface Normalizer {}
      • Interface defining a content transformation pasted from an external editor.

        Normalizers are registered by the plugin and run on . They detect environment-specific quirks and transform it into a form compatible with other CKEditor features.

      method execute

      execute: (data: NormalizerData) => void;
      • Executes the normalization of a given data.

      method isActive

      isActive: (htmlString: string) => boolean;
      • Must return true if the htmlString contains content which this normalizer can transform.

      interface NormalizerData

      interface NormalizerData extends ClipboardInputTransformationData {}

        Package Files (5)

        Dependencies (1)

        Dev Dependencies (0)

        No dev dependencies.

        Peer Dependencies (0)

        No peer dependencies.

        Badge

        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@ckeditor/ckeditor5-paste-from-office.

        • Markdown
          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@ckeditor/ckeditor5-paste-from-office)
        • HTML
          <a href="https://www.jsdocs.io/package/@ckeditor/ckeditor5-paste-from-office"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>