CK 에디터 simple 도구상자 컴포넌트 로드
CMS/프레임워크 | Rhymix 2.0 |
---|---|
개발 언어 | PHP 7.4 |
PC는 CK 에디터 "기본 도구상자" 를 사용중이라 에디터 설정에 몇 로드시킨 컴포넌트들이 게시글 작성시 잘 보이는데
모바일은 CK 에디터 "심플 도구상자" 를 사용하여 사용설정한 컴포넌트들이 보이지 않습니다
modules/editor/skins/ckeditor/editor.html
파일을 열어보니
<!--@if($editor_toolbar === 'simple')-->
settings.ckeconfig.toolbar = [
{ name: 'styles', items: [ 'Font', 'FontSize', '-', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor' ] },
{ name: 'paragraph', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight' ] },
{ name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste' ] },
{ name: 'insert', items: [ 'Link', 'Image', 'Table' ] },
{ name: 'tools', items: [ 'Maximize', '-', 'Source' ] }
];
simple 도구상자로 설정되었을때 보이는 컴포넌트들이 따로 설정되어 있던데
모듈 에디터 설정 하단에 로드한 컴포넌트들을 추가로 로드하려면 어떻게 수정해야 할까요?
댓글 5
해당 부분을 아래와 같이 바꿔보세요. 이렇게 하면 간단 툴바에서도 에디터 컴포넌트를 모두 로드할 수 있습니다.
<!--@if($editor_toolbar === 'simple')-->
settings.ckeconfig.toolbar = [
{ name: 'styles', items: [ 'Font', 'FontSize', '-', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor' ] },
{ name: 'paragraph', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight' ] },
{ name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste' ] },
{ name: 'insert', items: [ 'Link', 'Image', 'Table' ] },
{ name: 'tools', items: [ 'Maximize', '-', 'Source' ] }
];
var xe_component_array = Object.keys(settings.ckeconfig.xe_component_arrays);
if (xe_component_array.length) {
settings.ckeconfig.toolbar.push({ name: 'xecomponent', items: xe_component_array });
}
<!--@endif-->
🔽
저는 아래와 같은 오류가 발생 합니다.
Sever Error
ParseError #0 "syntax error, unexpected '}', expecting end of file" in modules/editor/skins/ckeditor/editor.html on line 183
msg_administrator_login
수정 방법 문의 드려 봅니다.
라이믹스에서는 템플릿 문서를 php로 컴파일을 하게 되는데 이 과정에서 오류를 발견한 모양입니다.
자세한 디버깅은 컴파일된 php 파일을 열고 템플릿 html 파일과 비교해봐야 알 수 있을 거예요.
혹시 아직 오류를 개선하지 못하셨다면 의뢰를 해보시는 게 어떨까 싶습니다.