首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CKEditor 4.14.1 :从word插件粘贴时出错

CKEditor 4.14.1 :从word插件粘贴时出错
EN

Stack Overflow用户
提问于 2020-08-05 15:39:34
回答 1查看 210关注 0票数 0

我将我的ckeditor从4.7.3更新到了最新的4.14.1,没有任何问题。但是当我尝试使用paste from word插件时,我得到了这个错误:Uncaught TypeError: Cannot read property 'styles' of undefined in the pastefromword/filter/default.js

错误出现在default.js文件的最开始处:

代码语言:javascript
复制
( 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,
    ...

不知道为什么,我有pastetools插件,但似乎过滤器被设置为{},所以commonFilter最终变成了undefined,导致了我的错误。插件不能在没有过滤器的情况下工作吗?我不知道过滤器是如何工作的。

我在想一个配置问题。我在构建配置中添加了'pastefromword' : 1, 'pastetools' : 1。“从word粘贴”按钮在我的工具栏中,但我无法从word粘贴。

PS:我没有定制的版本,为了更新,我在ckeditor的网站donwload page上下载了完整的包

EN

回答 1

Stack Overflow用户

发布于 2020-12-29 20:50:11

我遇到了同样的问题,我修复了它包括粘贴插件。

ckeditor/plugins/pastetools/filter/common.js

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63260510

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档