forked from melishev/strapi-plugin-react-editorjs
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcustomTools.js
70 lines (67 loc) · 1.41 KB
/
customTools.js
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
import PluginId from '../pluginId'
import Embed from '@editorjs/embed'
import Table from '@editorjs/table'
import List from '@editorjs/list'
import Warning from '@editorjs/warning'
import Code from '@editorjs/code'
import LinkTool from '@editorjs/link'
import Raw from '@editorjs/raw'
import Header from '@editorjs/header'
import Quote from '@editorjs/quote'
import Marker from '@editorjs/marker'
import CheckList from '@editorjs/checklist'
import Delimiter from '@editorjs/delimiter'
import InlineCode from '@editorjs/inline-code'
const customTools = {
embed: Embed,
table: {
class: Table,
inlineToolbar: true,
},
list: {
class: List,
inlineToolbar: true,
},
warning: {
class: Warning,
inlineToolbar: true,
config: {
titlePlaceholder: 'Title',
messagePlaceholder: 'Message',
},
},
code: Code,
LinkTool: {
class: LinkTool,
config: {
endpoint: `/api/${PluginId}/link`,
},
},
raw: {
class: Raw,
inlineToolbar: true,
},
header: {
class: Header,
inlineToolbar: true,
},
quote: {
class: Quote,
inlineToolbar: true,
config: {
quotePlaceholder: 'Quote',
captionPlaceholder: 'Quote`s author',
},
},
marker: {
class: Marker,
inlineToolbar: true,
},
checklist: {
class: CheckList,
inlineToolbar: true,
},
delimiter: Delimiter,
inlineCode: InlineCode,
}
export default customTools