Skip to content

Commit 5189038

Browse files
committed
♻️ refactor: 에디터 폰트 보이게 변경
1 parent 1bdc227 commit 5189038

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/Editor/Editor.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ const formats = [
1414
'background',
1515
];
1616

17+
const fontFamilyMap = {
18+
나눔명조: '"Nanum Myeongjo", serif',
19+
'나눔손글씨 손편지체': '"Nanum Sonpyeonji Ce", cursive',
20+
Pretendard: '"Pretendard", sans-serif',
21+
'Noto Sans': '"Noto Sans", sans-serif',
22+
};
23+
1724
export default function Editor({ value, onChange, font }) {
1825
const modules = useMemo(() => {
1926
return {
@@ -30,7 +37,7 @@ export default function Editor({ value, onChange, font }) {
3037
useEffect(() => {
3138
const editorElement = document.querySelector('.ql-editor');
3239
if (editorElement) {
33-
editorElement.style.fontFamily = font;
40+
editorElement.style.fontFamily = fontFamilyMap[font];
3441
editorElement.style.fontSize = '18px';
3542
}
3643
}, [font]);

0 commit comments

Comments
 (0)