CKEDITOR.plugins.pastetools
A set of paste tools helpers.
Filtering
Properties
-
filters : Object.<String, Object>
CKEDITOR.plugins.pastetools#filters
Methods
-
createFilter( options ) → Function
CKEDITOR.plugins.pastetools#createFilter
Creates a filter based on passed rules.
Parameters
options : Object
Returns
Function
A function that wraps filter invocation.
-
getClipboardData( data, type ) → String | Blob
CKEDITOR.plugins.pastetools#getClipboardData
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
CKEDITOR.plugins.pastetools#getConfigValue
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
CKEDITOR.plugins.pastetools#getContentGeneratorName
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
CKEDITOR.plugins.pastetools#loadFilters
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.