기존 글
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 };
위와 같이 했는데 적용이 안되서요 ㅜㅜ
성공하신분 계실까요?
자문자답
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자)