toast에디터2 [React] Toast-UI Editor 폰트 컬러(글자 색상) 설정 color-syntax 플러그인 사용 방법 # Toast-UI Editor 폰트 컬러(글자 색상) 설정 플러그인 추가 방법 리액트에서 Toast-UI Editor 사용시, 글자 색깔을 설정할 수 있는 color-syntax 플러그인 사용법을 정리한다. (기본 툴바 옵션에 제공되지 않아, 플러그인을 설치하고 사용해야 한다. 매우 간단하다) - 공식 깃허브: https://github.com/nhn/tui.editor/tree/master/plugins/color-syntax * Toast-UI Editor 자체의 기본 사용 방법은 아래 글을 참고하자. [React] Toast UI Editor기본 사용 방법 1. 설치 - 리액트에서 사용할 경우, @toast-ui/editor-plugin-color-syntax 플러그인을 설치해준다. npm ins.. 2022. 5. 16. [React] Toast UI Editor기본 사용 방법 # Toast UI Editor기본 사용 방법 리액트에서 Toast-UI 에디터를 사용하는 방법을 정리한다. 공식홈: https://ui.toast.com/tui-editor React Wrapper 깃허브: https://github.com/nhn/tui.editor/tree/master/apps/react-editor 1. Editor 설치 - 리액트에서 사용할 것이므로, toast ui editor의 React Wrapper 버전을 설치한다. npm install @toast-ui/react-editor 2. 컴포넌트 적용 - 컴포넌트와 스타일을 임포트하고, - 일반 컴포넌트 처럼 사용하면서 옵션을 설정해준다. (옵션에 대해선 주석 설명 참고) import { useRef } from 'react'.. 2022. 5. 16. 이전 1 다음