运用 ckeditor 3.6.3

<script src="@Url.Content("~/Content/ckeditor/ckeditor.js")" type="text/javascript" ></script>
<script src="@Url.Content("~/Content/ckeditor/adapters/jquery.js")" type="text/javascript" ></script>
@using (Html.BeginForm("ForEmail", "CSOT", FormMethod.Post))
{
    <div>
        <fieldset>
            <legend>CSOT Email</legend>
            @Html.TextAreaFor(m => m.Bodies, new { @class = "ckeditor" })

         </fieldset>
     </div>
}

========================

 

自定义工具条,在ckeditor目录下打开 config.js:

 

默认

 

CKEDITOR.editorConfig = function( config )
{
 // Define changes to default configuration here. For example:
 // config.language = 'fr';
 // config.uiColor = '#AADC6E';

};

 

 

 

 

 

自定义
 


CKEDITOR.editorConfig = function( config )
{
 config.toolbar=[
             ["Source","Preview", "-"],
             ["Undo", "Redo", "-","RemoveFormat","-"],
             ["Bold", "Italic", "Underline", "Strike", "-","Subscript", "Superscript"],
             ["TextColor", "BGColor"]
 ];
 
 config.width='550pt';


}; 

 

 

 

其它值参考:

 

     [ "Source", "-", "Save", "NewPage", "Preview", "-", "Templates" ],
     [ "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Print", "SpellChecker", "Scayt" ],
     [ "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll", "RemoveFormat" ],
     [ "Form", "Checkbox", "Radio", "TextField", "Textarea", "Select", "Button", "ImageButton", "HiddenField" ],    

     [ "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript" ],
     [ "NumberedList", "BulletedList", "-", "Outdent", "Indent", "Blockquote", "CreateDiv" ],
     [ "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" ],
     [ "BidiLtr", "BidiRtl" ],
     [ "Link", "Unlink", "Anchor" ],
     [ "Image", "Flash", "Table", "HorizontalRule", "Smiley", "SpecialChar", "PageBreak", "Iframe" ],
     [ "Styles", "Format", "Font", "FontSize" ],
     [ "TextColor", "BGColor" ],
     [ "Maximize", "ShowBlocks", "-", "About" ]

 

 

posted @ 2012-05-19 16:43  Yu  阅读(464)  评论(0编辑  收藏  举报