2014-12-03 3 views
0

나는 기본 구성을 변경하기 위해 추가 파일을 사용하여 다음의 CDN에서 CKEditor를로드하고있어 설정하지 :CKEditor 구성

<script type="text/javascript" src="//cdn.ckeditor.com/4.3.3/standard/ckeditor.js"></script> 
<script type="text/javascript" src="/js/ckeditor/config.js"></script> 

내 설정 파일은 다음과 같습니다 : 사실

CKEDITOR.editorConfig = function(config) { 
    // Define changes to default configuration here. 
    // For the complete reference: 
    // http://docs.ckeditor.com/#!/api/CKEDITOR.config 

    // The toolbar groups arrangement, optimized for a single toolbar row. 
    config.toolbarGroups = [ 
     { name: 'document', groups: [ 'mode', 'document', 'doctools' ] }, 
     { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, 
     { name: 'editing',  groups: [ 'find', 'selection', 'spellchecker' ] }, 
     { name: 'forms' }, 
     { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, 
     { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] }, 
     { name: 'links' }, 
     { name: 'insert' }, 
     { name: 'styles' }, 
     { name: 'colors' }, 
     { name: 'tools' }, 
     { name: 'others' }, 
     { name: 'about' } 
    ]; 

    // The default plugins included in the basic setup define some buttons that 
    // we don't want too have in a basic editor. We remove them here. 
    config.removeButtons = 'Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,Subscript,Superscript'; 

    // Let's have it basic on dialogs as well. 
    config.removeDialogTabs = 'link:advanced'; 
}; 

I 이 응용 프로그램을 이전 개발자로부터 상속 받았으며 모든 설치에 필요한 파일을 수동으로 다운로드하지 않고 CDN으로 이동하려고합니다.

나도 함수의 밖으로 CONFIGS을 제거하려고 다음과 같이 직접 접근 :

CKEDITOR.config.removeDialogTabs = 'link:advanced'; 

을 ...하지만 그 중 하나가 작동하지 않았다.

콘솔에서 오류가 발생하지 않으며, 내가 수행 할 때 console.log(CKEDITOR) 개체가 있음을 알 수 있습니다. 내가 잘못하고 있다는 것이 명백한가요? 감사합니다.

답변

1

CDN이로드 된 CKEditor는 사용자 지정 구성을 제공하고 자체 기본 설정을 사용한다는 것을 모릅니다. CKEditor CDN 사이트에서 설명한대로 사용자 지정 구성 파일을 가리키는 config.customConfig 구성 옵션을 정의해야합니다.