Report an issue
Class

CKEDITOR.plugins.pastetools

class singleton since 4.13.0

A set of paste tools helpers.

Filtering

Properties

  • filters : Object.<String, Object>

    A collection of available filters.

    Defaults to {}

Methods

  • createFilter( options ) → Function

    Creates a filter based on passed rules.

    Parameters

    options : Object

    Returns

    Function

    A function that wraps filter invocation.

  • getClipboardData( data, type ) → String | Blob

    Gets clipboard data.

    Parameters

    data : Object

    Paste event data property.

    type : String

    MIME type of the requested data.

    Returns

    String | Blob

    Raw clipboard data.

  • getConfigValue( editor, configVariable ) → String | Boolean | Number | Object | Array

    Gets the configuration value.

    This function allows to get the configuration value for Paste Tools from the legacy Paste from Word configuration.

    Parameters

    editor : editor

    The editor instance.

    configVariable : String

    The configuration variable name.

    Returns

    String | Boolean | Number | Object | Array

    The configuration variable value.

  • getContentGeneratorName( content ) → String | undefined

    Gets the name of the generator used to create the given content.

    It returns undefined if the <meta> tag with the generator name was not present. It returns 'unknown' if the <meta> tag has a generator other than 'microsoft' or 'libreoffice'.

    Parameters

    content : String

    The clipboard data.

    Returns

    String | undefined

    The name of the recognized content generator. Possible values: 'microsoft', 'libreoffice', 'unknown', undefiend.

  • loadFilters( filters, callback ) → Boolean

    Loads external scripts containing filter definitions in given order.

    Parameters

    filters : String[]

    An array of filter URLs.

    callback : Function

    A callback that will be invoked after loading all scripts.

    Returns

    Boolean

    Returns true when there is no filters to load, false otherwise.