react 용 웹에디터 - flyeditor
flyeditor
flyeditor 는 ``React`` 환경에서 간편하게 사용할 수 있는 위지윅(WYSIWYG) 웹에디터 컴포넌트입니다.

설치
- npm i flyeditor
기본 사용법
- import React, { useState } from 'react';
- import FlyEditor from 'flyeditor';
- import 'flyeditor/dist/flyeditor.css';
- const MyEditor = () => {
- const [initContent, setInitContent] = useState('<p>안녕하세요!</p>');
- const [content, setContent] = useState('');
- const [isEditable, setIsEditable] = useState(true);
- return (
- <div className="my-container">
- <FlyEditor
- value={initContent}
- editable={isEditable}
- onChange={setContent}
- />
- </div>
- );
- };
- export default MyEditor;
뷰어 설정
- import { FlyView } from 'flyeditor';
- import 'flyeditor/dist/flyeditor.css';
- ...
- const MyViewer = () => {
- const [dbContent, setDbContent] = useState('');
- useEffect(()=>{
- // 예시: 서버 데이터 조회 API 호출
- const res = await api.getContent();
- setDbContent(res);
- }, [])
- return (
- <div className="my-viewer-container">
- <FlyView value={dbContent} />
- </div>
- );
- ...
- }
테스트, 가이드 문서
https://flyeditor.dev/
npm 링크
https://www.npmjs.com/package/flyeditor
flyeditor
웹에디터
에디터
react webeditor
리액트용 웹에디터
react editor
리액트 에디터
리액트 웹에디터
댓글 (0)
등록된 댓글이 없습니다.

