:::

9-2 所見即所得編輯器 CKEditor 用法

方法一:

<script type='text/javascript' src='ckeditor/ckeditor.js'></script>
<textarea name='content'  class='ckeditor'>

方法二:

<script type='text/javascript' src='ckeditor/ckeditor.js'></script>
<textarea name='content' cols=30 rows=5 id='editor'>請輸入內容</textarea>
<script type='text/javascript'>
  CKEDITOR.replace('editor' , { skin : 'v2' , toolbar : 'Basic' } );
</script>

自行定義工具列:http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Toolbar

 

例如(config,js):

CKEDITOR.editorConfig = function( config )
{
    config.toolbar = 'MyToolbar';
    config.toolbar_MyToolbar =
    [
       { name: 'clipboard', items : [ 'Undo','Redo' ] },
        { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','PageBreak' ] },
        { name: 'basicstyles', items : [ 'Bold','Italic','Strike','RemoveFormat' ] },
        { name: 'paragraph', items : [ 'NumberedList','BulletedList','Outdent','Indent'] },
        { name: 'links', items : [ 'Link','Unlink' ] },
        { name: 'styles', items : [ 'Styles','Format' ] },
        { name: 'tools', items : [ 'Font','FontSize' ] }
    ];
};


:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.cp27.secserverpros.com%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D499%26tbsn%3D19

書籍目錄

展開 | 闔起

線上使用者

192人線上 (44人在瀏覽線上書籍)

會員: 0

訪客: 192

更多…