CKEditor不在Chrome中渲染

CKEditor不在Chrome中渲染,ckeditor,Ckeditor,背景:我正在构建一个blog应用程序,其中blog content textarea字段将替换为CKEditor 问题:我在Chrome中加载网页后,在文本区域被禁用的情况下出现以下错误。 “未捕获的TypeError:无法读取未定义的属性'getComputedStyle'” 代码: Javascript: $(document).ready(function() { CKEDITOR.addCss('body {font-family: "Roboto", "Helvetica",

背景:我正在构建一个blog应用程序,其中blog content textarea字段将替换为CKEditor

问题:我在Chrome中加载网页后,在文本区域被禁用的情况下出现以下错误。 “未捕获的TypeError:无法读取未定义的属性'getComputedStyle'”

代码: Javascript:

$(document).ready(function() {
    CKEDITOR.addCss('body {font-family: "Roboto", "Helvetica", "Arial", sans-serif;}');
    var contentEditor = CKEDITOR.replace( 'blogContent' );
});
HTML:

<body>
   <textarea type="text" rows= "10" name="blogContent" id="blogContent" 
   maxlength="2000"></textarea>

   <script src="//cdn.ckeditor.com/4.9.2/standard/ckeditor.js"></script>
   <script src="/js/blog-form.js"></script>
</body>

版本: Chrome:Version66.0.3359.139(官方版本)(64位) 编辑:4.9.2


我正在寻求帮助来解决这个问题。这一问题在其他浏览器(Edge和Firefox)中不会出现。

运行此代码,它在chrome上工作:

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
   <script src="https://cdn.ckeditor.com/4.9.2/standard/ckeditor.js"></script>

<script>
$(document).ready(function(){


    CKEDITOR.addCss('body {font-family: "Roboto", "Helvetica", "Arial", sans-serif;}');
    var contentEditor = CKEDITOR.replace( 'blogContent' );
});
</script>
</head>
<body>


 <textarea type="text" rows= "10" name="blogContent" id="blogContent" 
   maxlength="2000"></textarea>





</body>
</html>

$(文档).ready(函数(){
addCss('body{font-family:“Roboto”,“Helvetica”,“Arial”,无衬线;}');
var contentEditor=CKEDITOR.replace('blogContent');
});

它在Chrome(66.0)上运行。在ckeditor.js之前添加jquery/js/jquery.min.js已经在ckeditor.js之前添加。但是,它在Chrome 66.0.3359.139上运行得非常好。如果控制台中显示任何错误或异常,控制台中显示的错误是:“未捕获类型错误:无法读取未定义的属性‘getComputedStyle’。”“文本区域被禁用。还有一个观察结果:在特定时间段内,如果我重新加载页面,textarea会在几分钟后因上述错误而被禁用。它工作正常,但此问题是一致的。同时检查此链接“”与您提到的问题相同。问题已解决。诀窍是添加最新的jquery.js文件。谢谢你,伙计。