ckeditor / ckeditor4

The best enterprise-grade WYSIWYG editor. Fully customizable with countless features and plugins.
https://ckeditor.com/ckeditor-4
Other
5.79k stars 2.48k forks source link

plugins clipboard dataTransfer error #5148

Closed derekjohnston closed 2 years ago

derekjohnston commented 2 years ago

Using ckeditor 4.18.0

when ctrl + v produces this error

Uncaught TypeError: Cannot read properties of undefined (reading 'exec') at CKEDITOR.plugins.clipboard.dataTransfer.h [as getData]

Editor on paste event is not fired

Comandeer commented 2 years ago

I'm not able to reproduce the issue. Could you provide more information, including the editor's config and used browser version?

dove commented 2 years ago

I work on the same team. I've pasted the build-config.js below. The editor config is pretty vanilla and browser I used is Edge Chromium 100 (same error in Chrome 100).

Note we are upgrading from 4.11.3 and am poring through release notes on changes. We see the new pastetools plugin got pulled down correctly as a dependency but perhaps we are missing something else in the version gap.

Also worth noting is that we bind to knockoutjs and so the handler for that would not be vanilla, where options are set. I'm looking into that might have changed there between versions.


var CKBUILDER_CONFIG = {
    skin: 'moono-lisa',
    preset: 'full',
    ignore: [
        '.DS_Store',
        '.bender',
        '.editorconfig',
        '.gitattributes',
        '.gitignore',
        '.idea',
        '.jscsrc',
        '.jshintignore',
        '.jshintrc',
        '.mailmap',
        '.npm',
        '.nvmrc',
        '.travis.yml',
        'bender-err.log',
        'bender-out.log',
        'bender.ci.js',
        'bender.js',
        'dev',
        'gruntfile.js',
        'less',
        'node_modules',
        'package-lock.json',
        'package.json',
        'tests'
    ],
    plugins : {
        'a11yhelp' : 1,
        'about' : 1,
        'autogrow' : 1,
        'basicstyles' : 1,
        'bidi' : 1,
        'blockquote' : 1,
        'clipboard' : 1,
        'codemirror' : 1,
        'colorbutton' : 1,
        'colordialog' : 1,
        'contextmenu' : 1,
        'copyformatting' : 1,
        'dialogadvtab' : 1,
        'div' : 1,
        'elementspath' : 1,
        'enterkey' : 1,
        'entities' : 1,
        'filebrowser' : 1,
        'find' : 1,
        'flash' : 1,
        'floatingspace' : 1,
        'font' : 1,
        'format' : 1,
        'forms' : 1,
        'horizontalrule' : 1,
        'htmlwriter' : 1,
        'iframe' : 1,
        'image2' : 1,
        'indentblock' : 1,
        'indentlist' : 1,
        'justify' : 1,
        'language' : 1,
        'link' : 1,
        'list' : 1,
        'liststyle' : 1,
        'magicline' : 1,
        'maximize' : 1,
        'newpage' : 1,
        'pagebreak' : 1,
        'pastefromexcel' : 1,
        'pastefromword' : 1,
        'pastetext' : 1,
        'preview' : 1,
        'print' : 1,
        'removeformat' : 1,
        'resize' : 1,
        'save' : 1,
        'scayt' : 1,
        'selectall' : 1,
        'sharedspace' : 1,
        'showblocks' : 1,
        'showborders' : 1,
        'smiley' : 1,
        'sourcearea' : 1,
        'specialchar' : 1,
        'stat' : 1,
        'stylescombo' : 1,
        'tab' : 1,
        'table' : 1,
        'tabletools' : 1,
        'templates' : 1,
        'textselection' : 1,
        'toolbar' : 1,
        'undo' : 1,
        'wordcount' : 1,
        'wysiwygarea' : 1
    },
    languages : {
        'en' : 1,
        'en-gb' : 1
    }
};
Comandeer commented 2 years ago

The issue originates from the Paste from Excel plugin which is a third-party one, and it is not maintained by CKSource. Since we cannot fix issues with the code that does not belong to us, we are unable to help solve your issue. Please redirect your question to the plugin’s author who should be able to review the problem and suggest a solution.

However, the official Paste from Word plugin also offers pasting from Excel and should be a good replacement for the Paste from Excel plugin.

dove commented 2 years ago

@Comandeer spot on, that is exactly it and I think you are right about going with the official Paste from Word. Thanks for you help