Javascript CKEditor:插件按钮赢得';不出现
使用最新的CKEditor,我试图从文档中添加他们的示例插件“timestamp”。我从Github提供的链接下载了所有代码,并将所有内容放在正确的位置 文件: github链接: 在config.js文件中,我放在这一行:Javascript CKEditor:插件按钮赢得';不出现,javascript,ckeditor,Javascript,Ckeditor,使用最新的CKEditor,我试图从文档中添加他们的示例插件“timestamp”。我从Github提供的链接下载了所有代码,并将所有内容放在正确的位置 文件: github链接: 在config.js文件中,我放在这一行: config.extraPlugins = 'timestamp'; 我关闭了浏览器,使用了其他几个月没用过的浏览器,等等,不管怎样,按钮图标永远不会出现 我在谷歌上搜索过这个问题,并在StackOverflow上阅读了几个Q。很多人都谈到了错误命名的图标或丢失的图标或其
config.extraPlugins = 'timestamp';
我关闭了浏览器,使用了其他几个月没用过的浏览器,等等,不管怎样,按钮图标永远不会出现
我在谷歌上搜索过这个问题,并在StackOverflow上阅读了几个Q。很多人都谈到了错误命名的图标或丢失的图标或其他什么,但这一次,它都在那里,它完全是从Github来的
一旦这样做了,我就可以尝试从旧的CKEditor v4.0安装中转移一些插件。谢谢 您还需要将插件添加到ckeditor.replace。这是一个简单的例子
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>A Simple Page with CKEditor</title>
<!-- Make sure the path to CKEditor is correct. -->
<script src="ckeditor.js"></script>
</head>
<body>
<form>
<textarea name="editor1" id="editor1" rows="10" cols="80">
This is my textarea to be replaced with CKEditor.
</textarea>
<script>
// Replace the <textarea id="editor1"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace( 'editor1', {
extraPlugins: 'timestamp'
} );
</script>
</form>
</body>
</html>
谢谢但遗憾的是,你建议的改变也没有效果。工具栏与您发布的配置完全没有变化,所以我真的想知道config.js文件是否正在被读取。我打开了Chrome开发工具,控制台中没有出现任何错误。可能再次尝试下载ckeditor。我的配置工作正常。你肯定是在服务器上运行它吗?新下载的,经过修改。。。同样的结果。config.js肯定被忽略了。我知道,因为我在CKEDITOR.replace代码中指定了宽度/高度,当我将其移动到配置文件时,它没有任何效果,大小恢复为“stock”;看来我有更大的问题。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>A Simple Page with CKEditor</title>
<!-- Make sure the path to CKEditor is correct. -->
<script src="ckeditor.js"></script>
</head>
<body>
<form>
<textarea name="editor1" id="editor1" rows="10" cols="80">
This is my textarea to be replaced with CKEditor.
</textarea>
<script>
// Replace the <textarea id="editor1"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace( 'editor1', {
extraPlugins: 'timestamp'
} );
</script>
</form>
</body>
</html>
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.toolbarGroups = [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing'] },
{ name: 'forms', groups: [ 'forms' ] },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph', 'timestamp'] },
{ name: 'links', groups: [ 'links' ] },
{ name: 'insert', groups: [ 'insert' ] },
'/',
{ name: 'styles', groups: [ 'styles' ] },
{ name: 'colors', groups: [ 'colors' ] },
{ name: 'tools', groups: [ 'tools' ] },
{ name: 'others', groups: [ 'others' ] },
{ name: 'about', groups: [ 'about' ] }
];
config.extraPlugins = 'timestamp';
config.allowedContent = true;
};