테마와 contentStyle
다크 모드, 색 바꾸기, 보기 화면과 똑같이 보이게 하기.
theme: 'auto' 는 운영체제 설정을 따라갑니다. 사이트에 테마 전환 단추가 있다면 editor.setTheme('dark') 를 부르세요.
색 바꾸기
에디터 색은 CSS 변수입니다. 사이트 색에 맞춰 덮어쓰세요.
.e82 {
--e82-accent: #0f73e5;
--e82-radius: 6px;
--e82-font: 'Pretendard Variable', sans-serif;
}보기 화면과 똑같이
게시판 글 보기 화면의 글꼴·크기·줄간격을 편집 영역에도 넣어 두면 쓴 그대로 보입니다.
createEditor('#editor', {
contentStyle: "body { font-family: 'Malgun Gothic'; font-size: 10pt; line-height: 1.6; } img { max-width: 100%; }",
});