CK 에디터 건으로 몇일 동안 삽질하고 있습니다. 

 

다름이 아니라 CK 에디터의 config.js 파일 속 엔터값 설정에 조건문으로 특정 게시판에서 

config.enterMode = CKEDITOR.ENTER_BR; 

위 문구를 게시판의 mid 값에 따라 적용을 별도로 시키고 싶습니다. 

 

조건문을 사용하면 될 것 같은데, 코드는 잼병인지라 도움을 요청드리고자 합니다.

 

특정 mid 값의 게시판에만 해당 코드가 미적용될 수 있도록 하는 코드를 좀 요청드려도 될까요?

스크립트로 작성을 해야할 것 같아서 골치가 아프네요.

 

 
CKEDITOR.editorConfig = function( config ) {

config.extraPlugins ='uploadimage,amembed,internallink';
config.enterMode = CKEDITOR.ENTER_BR;

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

config.removeButtons = 'Save,NewPage,Preview,Print,Cut,Copy,Paste,PasteText,PasteFromWord,Templates,Redo,Replace,Find,SelectAll,Scayt,Form,Checkbox,Button,Select,Radio,ImageButton,TextField,HiddenField,Textarea,Subscript,Italic,Strike,Superscript,RemoveFormat,Outdent,NumberedList,BidiLtr,BidiRtl,Language,Link,Unlink,Anchor,Image,Flash,Table,HorizontalRule,Smiley,Iframe,PageBreak,SpecialChar,Font,Styles,Maximize,ShowBlocks,About,CreateDiv,Blockquote,Undo';
};

 

  • Lv19
    current_mid 라는 이름으로 현재 mid값이 전역변수로 설정이 되어 있을 거예요
  • Lv19 ?
    !! 감사합니다. 3일간 골치아팠던 문제를 이제서야 해결했네요!