如何检查CK编辑器版本

42

在我的项目中有一个现有的CK编辑器文件夹,我该如何查找它的版本?是否有文档记录?

在我的项目中存在一个 CK 编辑器文件夹,我该如何确定它的版本并查阅相关文档?
7个回答

72

在config.js文件中,只需如下设置警报,就可以显示数值:

alert(CKEDITOR.version);

或者您可以直接在文件ckeditor_php4.php中查看,例如:

var $version = '3.6.3';

演示:

alert(CKEDITOR.version);
console.log("CKEDITOR.version ==",CKEDITOR.version);
   <head>
                <meta charset="utf-8">
                <title>CKEditor</title>
                <script src="https://cdn.ckeditor.com/4.11.4/standard/ckeditor.js"></script>
        </head>
        <body>
                <textarea id="editor1"></textarea>
                <script>
                        CKEDITOR.replace( 'editor1' );
                </script>
        </body>


1
或者在“your_project\vendor\ckeditor\ckeditor\package.json”中"version": "4.9.2", - Borjovsky

16

我检查了版本3.6,版本信息位于以下位置:

/ckeditor/CHANGES.html

CKEditor Changelog

CKEditor 3.6.6.1

4.X 使用标记文件:

/ckeditor/CHANGES.md

CKEditor 4 Changelog
====================

## CKEditor 4.4.1

9

5
在最新的CKEditors中,有一个默认面板上的按钮“?”。单击它,您将看到版本号。否则,如果按钮不存在,您需要检查源文件。在开头,它们肯定应该包含作者数据和版本号。

18
您也可以在JS控制台中输入CKEDITOR.version - Reinmar

2

CKEDITOR.version会提供当前CKEDITOR的版本信息。

alert(CKEDITOR.version);
console.log("CKEDITOR.version ==",CKEDITOR.version);
   <head>
                <meta charset="utf-8">
                <title>CKEditor</title>
                <script src="https://cdn.ckeditor.com/4.11.4/standard/ckeditor.js"></script>
        </head>
        <body>
                <textarea id="editor1"></textarea>
                <script>
                        CKEDITOR.replace( 'editor1' );
                </script>
        </body>


1

查看 ckeditor/ckeditor.js 文件。在文件顶部,您可以找到版本信息。


我不知道为什么这个被踩了,它对我很有用。 - fuomag9

0

对于 ckeditor 5,您可以在 js 文件中使用以下代码获取版本号:

console.log(CKEDITOR_VERSION);

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接