CKEditor 4.14.1 : error when pasting with paste from word plugin

Viewed 340

I updated my ckeditor from 4.7.3 to the lastest 4.14.1 with no problems that far. But when I try to use the paste from word plugin, I have this error: Uncaught TypeError: Cannot read property 'styles' of undefined in the pastefromword/filter/default.js

The error is at the very beginning of the default.js' file:

( function() {
'use strict';

var tools = CKEDITOR.tools,
    pastetools = CKEDITOR.plugins.pastetools,
    commonFilter = pastetools.filters.common,
    Style = commonFilter.styles, // <-- error this line
    createAttributeStack = commonFilter.createAttributeStack,
    getElementIndentation = commonFilter.lists.getElementIndentation,
    ...

No idea why, I have the pastetools plugin but it seems filters are set to {} so commonFilter ends up undefined and cause my error. Can't the plugin works without filters? I have no clue how filters work.

I was thinking of a config issue. I added 'pastefromword' : 1, 'pastetools' : 1 in my build config. The paste from word button's is in my toolbar but I can't paste from word.

PS: I don't have a custom build and for update I took the full package on ckeditor's website donwload page

1 Answers

I encountered the same issue, I fixed it by including pastetools plugin.

ckeditor/plugins/pastetools/filter/common.js

Related