File tree 3 files changed +20
-1
lines changed
3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 9
9
:title =" $t('Toggle Menu')"
10
10
@click =" $emit('toggleMenu')"
11
11
/>
12
+ <q-separator class =" q-ml-md" vertical inset />
13
+
14
+ <q-btn dense flat rouned icon =" content_cut" @click =" tokenize" />
12
15
</q-toolbar >
13
16
</template >
14
17
@@ -24,6 +27,12 @@ export default {
24
27
: " bg-white text-grey-7 shadow-white" ;
25
28
},
26
29
},
30
+
31
+ methods: {
32
+ tokenize () {
33
+ this .$store .dispatch (" editor/tokenizeContent" );
34
+ },
35
+ },
27
36
};
28
37
</script >
29
38
Original file line number Diff line number Diff line change 1
1
<template >
2
- <q-page padding class =" column full-height" @click =" onFocus" >
2
+ <q-page class =" column full-height" @click =" onFocus" >
3
3
<editor ref =" editor" class =" col" />
4
4
</q-page >
5
5
</template >
Original file line number Diff line number Diff line change
1
+ import { api } from "boot/axios"
2
+
1
3
export function updateContent ( { commit, dispatch} , html ) {
2
4
commit ( 'setContentHTML' , html )
3
5
commit ( 'setLastChange' , new Date ( ) )
@@ -19,3 +21,11 @@ export function saveFile({ commit }) {
19
21
commit ( 'saveContentHTML' )
20
22
commit ( 'setLastSave' )
21
23
}
24
+
25
+ export async function tokenizeContent ( { commit, state } ) {
26
+ console . log ( state . contentHTML )
27
+ const response = await api . post ( "/tokens/" ,
28
+ { content : state . contentHTML }
29
+ )
30
+ console . log ( response . data )
31
+ }
You can’t perform that action at this time.
0 commit comments