forked from tinymce/tinymce-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
56 lines (54 loc) · 1.63 KB
/
index.ts
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
import { storiesOf } from '@storybook/vue';
// Import your custom components.
import { Editor } from '../src/components/Editor';
import { content } from './fakeContent';
storiesOf('TestComponent', module)
.add('inline in init', () => ({
components: { Editor },
data: () => ({ content }),
template: `<div>
<editor :init="{inline: true}" v-model="content"></editor>
</div>`
}))
.add('inline', () => ({
components: { Editor },
data: () => ({ content }),
template: `<div>
<editor inline v-model="content" />
<textarea style="width: 100%;height:150px;" v-model="content"></textarea>
<div v-html="content"></div>
</div>`
}))
.add('inlite', () => ({
components: { Editor },
data: () => ({ content }),
template: `<div>
<editor inline :init="{theme: 'inlite'}" v-model="content" />
<textarea style="width: 100%;height:150px;" v-model="content"></textarea>
<div v-html="content"></div>
</div>`
}))
.add('iframe', () => ({
components: { Editor },
data: () => ({ content, test: '' }),
methods: {
// tslint:disable-next-line:no-console
log: (e: any, editor: any) => console.log(e.screenY, e.screenX)
},
template: `<div>
<editor
:init="{branding: false, height: 300}"
api-key="hello"
plugins="link"
toolbar="link bold italic"
v-model="content"
/>
<editor
:init="{branding: false, height: 300}"
api-key="hello"
v-model="content"
/>
<textarea style="width: 100%;height:150px;" v-model="content"></textarea>
<div v-html="content"></div>
</div>`
}));