diff --git a/plugin.js b/plugin.js index b9122c2..a06a450 100644 --- a/plugin.js +++ b/plugin.js @@ -80,6 +80,16 @@ }); }; + /** + * Проверка необходимости проигнорировать вставку. + * К примеру, потому что вставку должен обработать другой плагин. + * @param {CKEDITOR.eventInfo} event + * @returns {boolean} + */ + CKEDITOR.config.pastefileCheckIgnorePaste = function(event) { + return false; + }; + var ATTR_PASTE_IGNORE = 'data-cke-pastefile-ignore'; var ATTR_PASTE_INLINE = 'data-cke-pastefile-inline'; var ATTR_PLACEHOLDER = 'data-cke-pastefile-placeholder'; @@ -301,6 +311,10 @@ return; } + if (this.config.pastefileCheckIgnorePaste(event)) { + return; + } + var plugin = this.plugins.pastefile; var clipboardIterator = new ClipboardDataIterator(dataTransfer, this.config.pastefileInlineMaxSize); clipboardIterator.on('iterator:inline', plugin._onIterateInline, this);