CK에디터 플러그인 - 트위터 같은 글자수 카운트 및 글자수 제한 문의
CMS/프레임워크 | Rhymix 2.1 |
---|---|
개발 언어 | PHP 7.4 |
기존 글
https://xetown.com/tips/763833
작성된지 오래된? 글이라서 그런지 차이가 조금 있는것 같아서요
본문에 작성된 플러그인까지 모두 설치 후 에디터 화면내에
위와 같이 글자수 표시는 되는데요
config.js 파일에
아래와 같은 코드를 넣으라고 하셔서 찾아봤는데 아무리 찾아봐도
config.js 파일이 없어서
아래의 경로에 config.js 파일을 만들어서 넣었습니다.
common\js\plugins\ckeditor\ckeditor\config.js
필수
config.extraPlugins = 'wordcount,notification';
옵션설정
config.wordcount =
{ // Whether or not you want to show the Word Count
showWordCount: false,
// Whether or not you want to show the Char Count
showCharCount: true,
// Maximum allowed Word Count
maxWordCount: 4,
// Maximum allowed Char Count
maxCharCount: 10 };
config.extraPlugins = 'wordcount,notification';
옵션설정
config.wordcount =
{ // Whether or not you want to show the Word Count
showWordCount: false,
// Whether or not you want to show the Char Count
showCharCount: true,
// Maximum allowed Word Count
maxWordCount: 4,
// Maximum allowed Char Count
maxCharCount: 10 };
위와 같이 했는데 적용이 안되서요 ㅜㅜ
성공하신분 계실까요?
Maxter
Lv. 6
반가워요~
댓글 2
자문자답
wordcount 플러그인 설치 폴더내에
plugin.js 파일을 열어서
// Default Config
var defaultConfig = {
showRemaining: false,
showParagraphs: false,
showWordCount: false,
showCharCount: true,
countBytesAsChars: false,
countSpacesAsChars: false,
countHTML: false,
countLineBreaks: false,
hardLimit: true,
//MAXLENGTH Properties
maxWordCount: -1,
maxCharCount: 300,
위 부분 수정하면 적용 됩니다.
굵은 글씨
showCharCount: true, (글자수 표시)
maxCharCount: 300, (글자수 제한 300자)
이건 성공했는데
특정 게시판에만 적용하는게 안되네요 ㅜㅜ
https://xetown.com/questions/1018742
이 게시물에 따르면 또 config.js 파일에 코드를 넣으라고 되어있는데
config.js 파일이 안보이니 ㅜㅜ
if(currrent_mid == 'MIDNAME'){
// CODE
}
이 코드를 넣으면 된다고하시는데
위에 제가 해봤던 plugin.js 파일에 넣어봤는데 작동이 안되네요 ㅜㅜ
고수님 계시면 답변 좀 부탁드려요 ㅜ