I also needed to one day work with a smaller Toolbar and another default,
create a class in Javascript this way:
<script type="text/javascript">
var EditorHtml = function () {
var name;
var editorsmall;
EditorHtml.prototype.Name = function (value) {
this.name = value;
};
EditorHtml.prototype.EditorSmall = function (value) {
if (value == true || value == false) {
this.editorsmall = value;
} else {
this.editorsmall = false;
}
}
EditorHtml.prototype.Render = function (value) {
if (value != undefined) {
this.name = value;
}
if (this.editorsmall == true) {
var editor = CKEDITOR.replace(this.name, {
toolbar: 'Custom',
toolbar_Custom: [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
{ name: 'styles', items: ['Styles', 'Format'] },
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', '-', 'RemoveFormat'] },
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Blockquote', 'JustifyLeft', 'JustifyCenter', 'JustifyRight'] },
{ name: 'links', items: ['Link', 'Unlink', 'Anchor'] },
{ name: 'insert', items: ['Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe'] },
{ name: 'tools', items: ['Maximize', '-', 'About'] }
]
});
} else {
var editor = CKEDITOR.replace(this.name);
}
CKFinder.setupCKEditor(editor, '/Content/ckeditor/ckfinder/');
};
}
</script>
As an example a textarea by the name of Text
<textarea name="Texto" id="Texto"></textarea>
Calling the class that way:
<script type="text/javascript">
var editor = new EditorHtml();
editor.EditorSmall(true);
editor.Render("Texto");
</script>
All settings you want to create a new one Toolbar is in the Docs ckeditor, where is the class
Editorhtml the configuration toolbar_Custom
, you make the appropriate changes, then having a default type and another configured with your style.
References