-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex-default.html
108 lines (94 loc) · 3.22 KB
/
ex-default.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>example for w-ckeditor-vue</title>
<!-- ckeditor5 -->
<script src="../dist/ckeditor.js"></script>
<!-- vue -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.min.js"></script>
<!-- w-ckeditor-vue -->
<script src="https://cdn.jsdelivr.net/npm/w-ckeditor-vue@latest/dist/w-ckeditor-vue.umd.js"></script>
</head>
<body style="font-family:'Microsoft JhengHei','Avenir','Helvetica'; margin:0px; padding:0px;">
<div id="app">
<div style="margin:20px;">
<div>1. bind height ({{height}}px)</div>
<div>
<button type="button" @click="height=150">set height to 150px</button>
<button type="button" @click="height=200">set height to 200px</button>
</div>
<w-ckeditor-vue
:height="height"
v-model="content"
></w-ckeditor-vue>
</div>
<div style="margin:20px;">
<div>2. sync content</div>
<w-ckeditor-vue
:height="200"
v-model="content"
></w-ckeditor-vue>
</div>
<div style="margin:20px;">
<div>3. settings</div>
<w-ckeditor-vue
:settings="settings"
v-model="content"
></w-ckeditor-vue>
</div>
</div>
<script>
//install w-ckeditor-vue
Vue.component('w-ckeditor-vue',window['w-ckeditor-vue'])
//initialize
new Vue({
el: '#app',
data: {
content: 'abc中文123',
height: 200,
settings: {
language: 'zh',
toolbar: {
items: [
'heading',
'|',
'fontSize',
'fontColor',
'fontBackgroundColor',
'|',
'bold',
'italic',
'underline',
'strikethrough',
'|',
'subscript',
'superscript',
'|',
'alignment',
'bulletedList',
'numberedList',
'|',
'redo',
'undo',
'|',
'removeFormat'
]
},
},
},
// mounted: function() {
// let vo=this
// let h=vo.height
// let t=setInterval(function(){
// vo.height-=2
// if(vo.height<=200){
// vo.height=h
// clearInterval(t)
// }
// },50)
// },
})
</script>
</body>
</html>