Gathering detailed insights and metrics for @toast-ui/react-editor
Gathering detailed insights and metrics for @toast-ui/react-editor
Gathering detailed insights and metrics for @toast-ui/react-editor
Gathering detailed insights and metrics for @toast-ui/react-editor
🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
npm install @toast-ui/react-editor
Typescript
Module System
Node Version
NPM Version
TypeScript (85.81%)
CSS (4.99%)
JavaScript (4.96%)
HTML (4.13%)
Vue (0.11%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
17,601 Stars
361 Commits
1,814 Forks
227 Watchers
56 Branches
115 Contributors
Updated on Jul 15, 2025
Latest Version
3.2.3
Package Id
@toast-ui/react-editor@3.2.3
Unpacked Size
17.59 kB
Size
4.97 kB
File Count
6
NPM Version
7.7.6
Node Version
15.14.0
Published on
Feb 17, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
This is a React component wrapping TOAST UI Editor.
React Wrapper of TOAST UI Editor applies Google Analytics (GA) to collect statistics on the use of open source, in order to identify how widely TOAST UI Editor is used throughout the world. It also serves as important index to determine the future course of projects. location.hostname (e.g. ui.toast.com) is to be collected and the sole purpose is nothing but to measure statistics on the usage. To disable GA, use the usageStatistics
props like the example below.
1<Editor 2 ... 3 usageStatistics={false} 4/>
1npm install --save @toast-ui/react-editor
You can use TOAST UI Editor for React as a ECMAScript module or a CommonJS module. As this module does not contain CSS files, you should import toastui-editor.css
from @toast-ui/editor
in the script.
1import '@toast-ui/editor/dist/toastui-editor.css'; 2 3import { Editor } from '@toast-ui/react-editor';
1require('@toast-ui/editor/dist/toastui-editor.css'); 2 3const { Editor } = require('@toast-ui/react-editor');
All the options of the TOAST UI Editor are supported in the form of props.
1import '@toast-ui/editor/dist/toastui-editor.css'; 2 3import { Editor } from '@toast-ui/react-editor'; 4 5const MyComponent = () => ( 6 <Editor 7 initialValue="hello react editor world!" 8 previewStyle="vertical" 9 height="600px" 10 initialEditType="markdown" 11 useCommandShortcut={true} 12 /> 13);
For using instance methods of TOAST UI Editor, first thing to do is creating Refs of wrapper component using createRef()
. But the wrapper component does not provide a way to call instance methods of TOAST UI Editor directly. Instead, you can call getInstance()
method of the wrapper component to get the instance, and call the methods on it.
1import '@toast-ui/editor/dist/toastui-editor.css'; 2 3import { Editor } from '@toast-ui/react-editor'; 4 5class MyComponent extends React.Component { 6 editorRef = React.createRef(); 7 8 handleClick = () => { 9 this.editorRef.current.getInstance().exec('bold'); 10 }; 11 12 render() { 13 return ( 14 <> 15 <Editor 16 previewStyle="vertical" 17 height="400px" 18 initialEditType="markdown" 19 initialValue="hello" 20 ref={this.editorRef} 21 /> 22 <button onClick={this.handleClick}>make bold</button> 23 </> 24 ); 25 } 26}
An instance of the wrapper component also provides a handy method for getting the root element. If you want to manipulate the root element directly, you can call getRootElement
to get the element.
1import '@toast-ui/editor/dist/toastui-editor.css'; 2 3import { Editor } from '@toast-ui/react-editor'; 4 5class MyComponent extends React.Component { 6 editorRef = React.createRef(); 7 8 handleClickButton = () => { 9 this.editorRef.current.getRootElement().classList.add('my-editor-root'); 10 }; 11 12 render() { 13 return ( 14 <> 15 <Editor 16 previewStyle="vertical" 17 height="400px" 18 initialEditType="markdown" 19 initialValue="hello" 20 ref={this.editorRef} 21 /> 22 <button onClick={this.handleClickButton}>Click!</button> 23 </> 24 ); 25 } 26}
All the events of TOAST UI Editor are supported in the form of on[EventName]
props. The first letter of each event name should be capitalized. For example, for using focus
event you can use onFocus
prop like the example below.
1import '@toast-ui/editor/dist/toastui-editor.css'; 2 3import { Editor } from '@toast-ui/react-editor'; 4 5class MyComponent extends React.Component { 6 handleFocus = () => { 7 console.log('focus!!'); 8 }; 9 10 render() { 11 return ( 12 <Editor 13 previewStyle="vertical" 14 height="400px" 15 initialEditType="markdown" 16 initialValue="hello" 17 ref={this.editorRef} 18 onFocus={this.handleFocus} 19 /> 20 ); 21 } 22}
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
Found 9/30 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
92 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More