Source

django-swingcms / swingcms / cms / templates / cms / texteditor.html




<script type="text/javascript" src="{{ STATIC_URL }}cms/js/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}cms/js/adaptors/jquery.js"></script>

<script type="text/javascript">

    function visualeditor(id, level) {

        CKEDITOR.replace(id, 
            {
                toolbar : level,
                startupFocus : false,
                resize_enabled : false,

                //skin : 'v2',

                toolbar_Full :
                [
                    ['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'],
                    ['BidiLtr', 'BidiRtl'],
                    '/',
                    ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
                    ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
                    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
                    ['Link','Unlink','Anchor'],
                    ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
                    '/',
                    ['Styles','Format','Font','FontSize'],
                    ['TextColor','BGColor'],
                    ['Maximize', 'ShowBlocks']
                ],
                toolbar_Medium :
                [
                    ['Source','-','Preview','-','Templates'],
                    ['Cut','Copy','Paste','PasteText','-','Print', 'SpellChecker', 'Scayt'],
                    ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
                    '/',
                    ['Bold','Italic','Underline','Strike','Subscript','Superscript'],
                    ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
                    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
                    ['Link','Unlink','Anchor'],
                    ['Image','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
                    '/',
                    ['Styles','Format','Font','FontSize'],
                    ['TextColor','BGColor'],
                    ['Maximize', 'ShowBlocks']
                ],
                toolbar_Small :
                [
                    ['Source','Bold','Italic','Underline','Strike'],
                    ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
                    ['Link','Unlink','Anchor'],
                    '/',
                    ['Font','FontSize','TextColor'],
                    ['Maximize']
                ],
                toolbar_Mini :
                [
                    ['Source','Bold','Italic','Underline','FontSize'],
                    ['JustifyLeft','JustifyCenter','JustifyBlock'],
                    ['Link'],
                ],
                language : '{{ LANGUAGE_CODE }}',
                uiColor : '#F7F7F7',

                filebrowserBrowseUrl : '/CKEditor_browser',
                filebrowserUploadUrl : '/CKEditor_uploader',
                filebrowserImageBrowseUrl : '/CKEditor_browser?type=image',
                filebrowserImageUploadUrl : '/CKEditor_uploader?type=image',
                filebrowserLinkBrowseUrl : '/CKEditor_browser?type=file',
                filebrowserLinkUploadUrl : '/CKEditor_uploader?type=file',
                filebrowserWindowWidth : '640',
                filebrowserWindowHeight : '480',

                //customConfig: '/custom/config.js' // this replace others settings
            }); 
    };

</script>