顯示具有 ckeditor 標籤的文章。 顯示所有文章
顯示具有 ckeditor 標籤的文章。 顯示所有文章

2018年11月1日

Grocery_crud CKEditor 客製化功能選單

Grocerycrud CKEditor客製化功能選單,留下常用的功能選單

/assets/grocery_crud/js/jquery_plusins/config/jquery.ckeditor.config.js
$(function(){
$( 'textarea.texteditor' ).ckeditor({toolbar:'MyBasic'});
$( 'textarea.mini-texteditor' ).ckeditor({toolbar:'MyBasic',width:700});
});

/assets/grocery_crud/texteditor/config.js
CKEDITOR.editorConfig = function( config )
{
CKEDITOR.config.toolbar_MyBasic =
[
[ 'Source','ShowBlocks','Maximize','Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo','Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat'],
'/',
['Image','Table','HorizontalRule','Link','Unlink','Anchor'],
'/',
['Styles','Format','Font','FontSize','TextColor','BGColor' ]
];
};

2014年3月5日

CKEditor 參數設定

config.js

CKEDITOR.editorConfig = function( config )
{
    config.language = 'zh';
    //config.uiColor = '#AADC6E';
    //config.uiColor = '#4895FF';
   
    //config.width=800;
    //config.height=600
    //config.resize_enabled = false;
    config.toolbar = 'general';
    //config.toolbar = 'Full';
   
    config.toolbar_general =
    [
        {name:'line1',items:['Undo','Redo','Copy','Paste','PasteText','PasteFromWord']},
        {name:'line2',items:['Bold','Italic','Underline','Strike','RemoveFormat']},
        {name:'line3',items:['NumberedList','BulletedList','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock']},
        {name:'line4',items:['Link','Unlink','Image','Flash','Table','HorizontalRule','PageBreak','Source']},
            '/',
        {name:'line5',items:['Format','Font','FontSize','TextColor','BGColor','Maximize','ShowBlocks','About']},
    ];
    config.toolbar_piconly =
    [
        {name:'line1',items:['Image','Source']},
    ];
   
    /*
    config.toolbar_Full =
    [
        { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
        { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
        { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
        { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton',
   
             'HiddenField' ] },
        '/',
        { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
        { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
                                //                        減少縮排 增加縮排
        { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
        { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
        '/',
        { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
        { name: 'colors', items : [ 'TextColor','BGColor' ] },
        { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
    ];*/

};

2011年8月31日

CKEditor,CKFinder安裝筆記

下載ckeditor,ckfinder
網站根目錄建立ck,ckimg資料夾
將ckeditor,ckfinder複製到ck資料夾
ckimg預計拿來放上傳的圖片

設定ckfinder/config.php

最重要的是設定下列二行:
$baseUrl = 'http://'.$_SERVER['HTTP_HOST'].'/ckimg/';
$baseDir = str_replace('/ck/ckfinder/config.php', '', str_replace('\\', '/', __FILE__))."/ckimg/";

test.html

(script type="text/javascript" src="(base_url)ckeditor.js")(/script)
(script type="text/javascript" src="(base_url)ckfinder.js")(/script)

(textarea id='cardpic' name='cardpic' type='text')(/textarea)