我创建了一个名为timestamp的插件。 代码plugin.js是这样的:CKEditor:工具栏不出现
CKEDITOR.plugins.add('timestamp',
{
init: function(editor)
{
editor.addCommand('insertTimestamp',
{
exec : function(editor)
{
var timestamp = new Date();
editor.insertHtml(timestamp.toString());
}
});
editor.ui.addButton('Timestamp',
{
label: 'Insert Timestamp',
command: 'insertTimestamp',
icon: this.path + '/icons/timestamp.png'
});
}
});
图标是/_source/plugins/timestamp/icons
但是,当我试图添加插件在./samples/fullpage.html
,甚至是工具栏没有出现 代码:
<script>
CKEDITOR.replace('editor1', {
fullPage: true,
extraPlugins: 'wysiwygarea,timestamp',
toolbar :
[
[ 'Bold', 'Italic', '-', 'NumberedList' ],
[ 'Timestamp' ]
]
});
</script>
如果我试图添加此插件在config.js,工具栏出现,但没有时间戳(我的自定义插件)
代码:
config.extraPlugins ='timestamp';
请让我知道怎么回事wrong.Thanks
这不会改变任何东西 – Reinmar
我有同样的问题,但只是这样做的工作。定制按钮出现:) – bkashaf
我很困惑:)这看起来像一个错误。我们会对此进行调查,因为在额外的插件中增加wysiwygarea没有任何问题。 – Reinmar