2012-10-05 3 views
4

CKEditor 도구 모음을 사용자 지정하고 있습니다. IFrame을 추가하고 싶습니다. 어떻게해야합니까? 내가 시도CKEditor에서 IFrame 도구를 추가하는 방법은 무엇입니까?

내 코드 :

CKEDITOR.replace('editor1',{ 
      toolbar : 
       [ 
        ['SpellChecker','Bold', 'Italic','Underline','Subscript','Superscript'], 
        ['NumberedList','BulletedList','-','Blockquote','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], 
        ['Link', 'Unlink','Anchor'] ,['Image','Flash','Table','HorizontalRule','SpecialChar','IFrame'], 
        '/', 
        ['Styles','Format','Font','FontSize' ], 
        ['TextColor','BGColor'], 
        ['Maximize'] 
       ] 
      }); 

답변

9

나는 내 자신의 프로젝트에 ckeditor를 사용하고, 내 설정 파일은 다음과 같습니다. IFrame 플러그인을 소문자 'f'로 참조합니다.

CKEDITOR.editorConfig = function (config) { 

config.toolbar = 'Full'; 
config.toolbar_Full = 
[ 
    { name: 'document', items: ['Source', '-', 'Save', 'NewPage', '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'] } 
]; 
}; 
관련 문제