Gathering detailed insights and metrics for @toast-ui/vue-editor
Gathering detailed insights and metrics for @toast-ui/vue-editor
Gathering detailed insights and metrics for @toast-ui/vue-editor
Gathering detailed insights and metrics for @toast-ui/vue-editor
🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
npm install @toast-ui/vue-editor
Typescript
Module System
Node Version
NPM Version
65.6
Supply Chain
98.3
Quality
78.3
Maintenance
50
Vulnerability
99.6
License
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/vue-editor@3.2.3
Unpacked Size
22.86 kB
Size
6.72 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
1
1
4
This is Vue component wrapping TOAST UI Editor.
Vue 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 following usageStatistics
options when declare Vue Wrapper component.
1const options = { 2 ... 3 usageStatistics: false 4}
1npm install --save @toast-ui/vue-editor
You can use Toast UI Editor for Vue 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/vue-editor';
1require('@toast-ui/editor/dist/toastui-editor.css'); 2 3const { Editor } = require('@toast-ui/vue-editor');
First implement <editor/>
in the template.
1<template> 2 <editor /> 3</template>
And then add Editor
to the components
in your component or Vue instance like this:
1import '@toast-ui/editor/dist/toastui-editor.css'; 2 3import { Editor } from '@toast-ui/vue-editor'; 4 5export default { 6 components: { 7 editor: Editor 8 } 9};
or
1import '@toast-ui/editor/dist/toastui-editor.css'; 2 3import { Editor } from '@toast-ui/vue-editor'; 4 5new Vue({ 6 el: '#app', 7 components: { 8 editor: Editor 9 } 10});
Name | Type | Default | Description |
---|---|---|---|
initialValue | String | '' | Editor's initial value . |
initialEditType | String | 'markdown' | Initial editor type (markdown, wysiwyg). |
options | Object | following defaultOptions | Options of tui.editor. This is for initailize tui.editor. |
height | String | '300px' | This prop can control the height of the editor. |
previewStyle | String | 'vertical' | Markdown editor's preview style (tab, vertical). |
1const defaultOptions = { 2 minHeight: '200px', 3 language: 'en-US', 4 useCommandShortcut: true, 5 usageStatistics: true, 6 hideModeSwitch: false, 7 toolbarItems: [ 8 ['heading', 'bold', 'italic', 'strike'], 9 ['hr', 'quote'], 10 ['ul', 'ol', 'task', 'indent', 'outdent'], 11 ['table', 'image', 'link'], 12 ['code', 'codeblock'], 13 ['scrollSync'], 14 ] 15};
1<template> 2 <editor 3 :initialValue="editorText" 4 :options="editorOptions" 5 height="500px" 6 initialEditType="wysiwyg" 7 previewStyle="vertical" 8 /> 9</template> 10<script> 11 import '@toast-ui/editor/dist/toastui-editor.css'; 12 13 import { Editor } from '@toast-ui/vue-editor'; 14 15 export default { 16 components: { 17 editor: Editor 18 }, 19 data() { 20 return { 21 editorText: 'This is initialValue.', 22 editorOptions: { 23 hideModeSwitch: true 24 } 25 }; 26 } 27 }; 28</script>
If you want to more manipulate the Editor, you can use invoke
method to call the method of toastui.editor. For more information of method, see instance methods of TOAST UI Editor.
First, you need to assign ref
attribute of <editor/>
and then you can use invoke
method through this.$refs
like this:
1<template> 2 <editor ref="toastuiEditor" /> 3</template> 4<script> 5 import '@toast-ui/editor/dist/toastui-editor.css'; 6 7 import { Editor } from '@toast-ui/vue-editor'; 8 9 export default { 10 components: { 11 editor: Editor 12 }, 13 methods: { 14 scroll() { 15 this.$refs.toastuiEditor.invoke('setScrollTop', 10); 16 }, 17 moveTop() { 18 this.$refs.toastuiEditor.invoke('moveCursorToStart'); 19 }, 20 getHTML() { 21 let html = this.$refs.toastuiEditor.invoke('getHTML'); 22 } 23 } 24 }; 25</script>
1<template> 2 <editor 3 @load="onEditorLoad" 4 @focus="onEditorFocus" 5 @blur="onEditorBlur" 6 @change="onEditorChange" 7 @caretChange="onEditorCaretChange" 8 /> 9</template> 10<script> 11 import { Editor } from '@toast-ui/vue-editor'; 12 13 export default { 14 components: { 15 editor: Editor 16 }, 17 methods: { 18 onEditorLoad() { 19 // implement your code 20 }, 21 onEditorFocus() { 22 // implement your code 23 }, 24 onEditorBlur() { 25 // implement your code 26 }, 27 onEditorChange() { 28 // implement your code 29 }, 30 onEditorCaretChange() { 31 // implement your code 32 } 33 } 34 }; 35</script>
1import '@toast-ui/editor/dist/toastui-editor-viewer.css'; 2 3import { Viewer } from '@toast-ui/vue-editor';
1require('@toast-ui/editor/dist/toastui-editor-viewer.css'); 2 3const { Viewer } = require('@toast-ui/vue-editor');
First implement <viewer />
in the template.
1<template> 2 <viewer /> 3</template>
And then add Viewer
to the components
in your component or Vue instance like this:
1import '@toast-ui/editor/dist/toastui-editor-viewer.css'; 2 3import { Viewer } from '@toast-ui/vue-editor'; 4 5export default { 6 components: { 7 viewer: Viewer 8 } 9};
or
1import '@toast-ui/editor/dist/toastui-editor-viewer.css'; 2 3import { Viewer } from '@toast-ui/vue-editor'; 4 5new Vue({ 6 el: '#app', 7 components: { 8 viewer: Viewer 9 } 10});
Name | Type | Default | Description |
---|---|---|---|
initialValue | String | '' | Viewer's initial value |
height | String | '300px' | This prop can control the height of the viewer. |
options | Object | above defaultOptions | Options of tui.editor. This is for initailize tui.editor. |
1<template> 2 <viewer :initialValue="viewerText" height="500px" /> 3</template> 4<script> 5 import '@toast-ui/editor/dist/toastui-editor-viewer.css'; 6 7 import { Viewer } from '@toast-ui/vue-editor'; 8 9 export default { 10 components: { 11 viewer: Viewer 12 }, 13 data() { 14 return { 15 viewerText: '# This is Viewer.\n Hello World.' 16 }; 17 } 18 }; 19</script>
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