Hello.
/** * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: config.language = 'ru'; // config.uiColor = '#AADC6E'; config.filebrowserWindowWidth = '800'; config.filebrowserWindowHeight = '250'; config.resize_enabled = true; config.htmlEncodeOutput = false; config.entities = false; config.extraPlugins = 'codemirror'; config.extraPlugins = 'font'; config.codemirror_theme = 'rubyblue'; config.toolbar = 'Custom'; };
When i add line
config.extraPlugins = 'justify';
font button is disappear!
When i shuffle lines like
config.extraPlugins = 'justify'; config.extraPlugins = 'font';
Justify buttons is disappear!
Hm... when i shuffle lines like
config.extraPlugins = 'font'; config.extraPlugins = 'justify';
font buttons is disappear!
And when i add line
config.extraPlugins = 'colorbutton';
Ckeditor is disappear!
This is magic?
I want to put three plugins: font (family and size), colorbutton (font color and background color), justify alignment. But something is very wrong.
All additional plugins should
All additional plugins should be listed in one config.extraPlugins setting, separated with a comma, like in the API example:
So in your case:
Otherwise you are simply overwriting one declaration with another.
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!
ExtraPlugins not working properly
Hi there,
I am Arun, Software engineer. I am using Ckeditor and added to extra plugins like "config.extraPlugins = 'createSave,SelectTemplate,SaveTemplate';" . Now select template and save template are two different buttons. When i click select template, save template button is working. I am implementing CKeditor in ASP.NET MVC. Following the code for implementation I used:
Config.js
CKEDITOR.plugins.addExternal('SelectTemplate', 'plugins/SelectTemplate/', 'plugin.js');
CKEDITOR.plugins.addExternal('SaveTemplate', 'plugins/SaveTemplate/', 'plugin.js');
CKEDITOR.editorConfig = function (config) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
ignoreEmptyParagraph = true;
config.filebrowserBrowseUrl = "/My/Browse";
config.filebrowserWindowWidth = 500;
config.filebrowserWindowHeight = 650;
config.filebrowserUploadUrl = "/My/Upload";
config.extraPlugins = 'createSave,SelectTemplate,SaveTemplate';
// Define the toolbar buttons you want to have available
config.toolbar = 'MyToolbar';
config.toolbar_MyToolbar = [
{ name: 'document', groups: ['mode', 'document', 'doctools'], items: ['Source', '-', 'SaveTemplate', '-', 'NewPage', 'Preview', 'Print', '-', 'Templates'] },
{ name: 'clipboard', groups: ['clipboard', 'undo'], items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'] },
{ name: 'editing', groups: ['find', 'selection', 'spellchecker'], items: ['Find', 'Replace', '-', 'SelectAll', '-', 'Scayt'] },
'/',
{ name: 'basicstyles', groups: ['basicstyles', 'cleanup'], items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'] },
{ name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi'], items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] },
{ name: 'links', items: ['Link', 'Unlink'] },
{ name: 'insert', items: ['Image', 'Table', 'HorizontalRule'] },
'/',
{ name: 'styles', items: ['Styles', 'Format', 'Font', 'FontSize'] },
{ name: 'colors', items: ['TextColor', 'BGColor'] },
{ name: 'tools', items: ['Maximize', 'ShowBlocks'] },
{ name: 'others', items: ['-', 'SelectTemplate'] }
];
};
View:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>MyRichTxt</title>
<script src="../Scripts/ckeditor/ckeditor.js" type="text/javascript"></script>
<script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
</head>
<body>
<div>
<textarea rows="5" cols="5" id="editor1" name="editor1"></textarea>
<script type="text/javascript">
CKEDITOR.replace('editor1');
(function () {
var saveCmd = {
modes: { wysiwyg: 1, source: 1 },
readOnly: 1,
exec: function (editor) {
//alert(editor.getData());
editor.fire("save", editor.getData());
}
};
var pluginName = 'createSave';
// Register a plugin named "createSave".
CKEDITOR.plugins.add(pluginName, {
init: function (editor) {
// overwrite the "save" command.. ;)
editor.addCommand("save", saveCmd);
}
});
})();
</script>
</div>
</body>
</html>
Thanks in advance
Regards,
Arun
FIxed the extra plugin not working
I have the given the command name for two extra plugin as same. I alter the name of the command differently. Now its working..
Thanks,
Arun