File tree 4 files changed +31
-4
lines changed
4 files changed +31
-4
lines changed Original file line number Diff line number Diff line change 5
5
< link rel ="icon " type ="image/svg+xml " href ="/vite.svg " />
6
6
< link href ="https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.min.css " rel ="stylesheet ">
7
7
< link href ="https://cdn.bootcdn.net/ajax/libs/font-awesome/6.2.0/css/all.css " rel ="stylesheet ">
8
- < link rel ="stylesheet " href ="https://uicdn.toast.com/editor/latest/toastui-editor.min.css " />
9
8
< script src ="https://cdn.bootcdn.net/ajax/libs/echarts/5.4.0/echarts.common.min.js "> </ script >
10
9
< script src ="https://uicdn.toast.com/editor/latest/toastui-editor-all.min.js "> </ script >
11
10
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
12
11
< title > Vite + Vue + TS</ title >
13
12
</ head >
14
13
< body >
14
+ < link rel ="stylesheet " href ="https://uicdn.toast.com/editor/latest/toastui-editor.min.css " />
15
+
15
16
< div id ="app "> </ div >
16
17
< script type ="module " src ="/src/main.ts "> </ script >
17
18
</ body >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
- asdfasf
3
+ < div id = " editor " ></ div >
4
4
</div >
5
5
</template >
6
6
7
7
<script setup lang="ts">
8
-
8
+ import { nextTick } from " vue"
9
+ import ToastEditor from " ./toastEditor"
10
+ nextTick (()=> {
11
+ new ToastEditor (' #editor' ,' 500px' ,' sdfsdfs' )
12
+ })
9
13
</script >
10
14
11
- <style scoped>
15
+ <style scoped lang="scss">
16
+ #editor {
17
+ @apply bg-white
18
+ }
12
19
13
20
</style >
Original file line number Diff line number Diff line change
1
+ export default class {
2
+ editor :toastui . Editor
3
+ constructor ( el :string , height :string , initialValue :string ) {
4
+ this . editor = new toastui . Editor ( {
5
+ el : document . querySelector ( el ) ,
6
+ height :height ,
7
+ initialValue : initialValue ,
8
+ initialEditTYpe :"markdown" ,
9
+ previewStyle :"vertical" ,
10
+ } )
11
+
12
+ }
13
+ }
Original file line number Diff line number Diff line change
1
+ declare namespace toastui {
2
+ class Editor {
3
+ constructor ( options :any )
4
+ }
5
+ // getMarkdown:()=>{},
6
+ }
You can’t perform that action at this time.
0 commit comments