<%@ Page Language="C#" AutoEventWireup="true" %> <%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %> Custom Toolbar Definition — CKEditor for ASP.NET Sample

CKEditor for ASP.NET Sample — Defining a Custom CKEditor Toolbar

CKEditor toolbar can be adjusted to your needs. You can define a toolbar that contains all the buttons available in the Full toolbar definition using the following code:

CKEditor1.config.toolbar = new object[]
{
    new object[] { "Source", "-", "Save", "NewPage", "Preview", "-", "Templates" },
    new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Print", "SpellChecker", "Scayt" },
    new object[] { "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll", "RemoveFormat" },
    new object[] { "Form", "Checkbox", "Radio", "TextField", "Textarea", "Select", "Button", "ImageButton", "HiddenField" },
    "/",
    new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript" },
    new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent", "Blockquote", "CreateDiv" },
    new object[] { "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" },
    new object[] { "BidiLtr", "BidiRtl" },
    new object[] { "Link", "Unlink", "Anchor" },
    new object[] { "Image", "Flash", "Table", "HorizontalRule", "Smiley", "SpecialChar", "PageBreak", "Iframe" },
    "/",
    new object[] { "Styles", "Format", "Font", "FontSize" },
    new object[] { "TextColor", "BGColor" },
    new object[] { "Maximize", "ShowBlocks", "-", "About" }
};
<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>

If you want to strip CKEditor toolbar to a bare minimum that suits your needs, limit your definition to what is needed only.

CKEditor2.config.toolbar = new object[]
{
    new object[] { "Bold", "Italic", "-", "NumberedList", "BulletedList", "-", "Link", "Unlink", "-", "About" },
    new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Print", "SpellChecker", "Scayt" },
};
<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>

You can also use one of the pre-defined CKEditor toolbar configurations (Full or Basic) by setting the config.toolbar property.

CKEditor3.config.toolbar = "Basic";
<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>