CKEDITOR.plugins.pastetools
A set of paste tools helpers.
Filtering
Properties
filters : Object.<String, Object>CKEDITOR.plugins.pastetools#filters
Methods
createFilter( options ) → FunctionCKEDITOR.plugins.pastetools#createFilterCreates a filter based on passed rules.
Parameters
options : Object
Returns
FunctionA function that wraps filter invocation.
getClipboardData( data, type ) → String | BlobCKEDITOR.plugins.pastetools#getClipboardDataGets clipboard data.
Parameters
data : ObjectPaste event
dataproperty.type : StringMIME type of the requested data.
Returns
String | BlobRaw clipboard data.
getConfigValue( editor, configVariable ) → String | Boolean | Number | Object | ArrayCKEDITOR.plugins.pastetools#getConfigValueGets the configuration value.
This function allows to get the configuration value for Paste Tools from the legacy Paste from Word configuration.
Parameters
editor : editorThe editor instance.
configVariable : StringThe configuration variable name.
Returns
String | Boolean | Number | Object | ArrayThe configuration variable value.
getContentGeneratorName( content ) → String | undefinedCKEDITOR.plugins.pastetools#getContentGeneratorNameGets the name of the generator used to create the given content.
It returns
undefinedif 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 : StringThe clipboard data.
Returns
String | undefinedThe name of the recognized content generator. Possible values:
'microsoft','libreoffice','unknown',undefiend.
loadFilters( filters, callback ) → BooleanCKEDITOR.plugins.pastetools#loadFiltersLoads external scripts containing filter definitions in given order.
Parameters
filters : String[]An array of filter URLs.
callback : FunctionA callback that will be invoked after loading all scripts.
Returns
BooleanReturns
truewhen there is no filters to load,falseotherwise.