-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patheditorConfig.js
76 lines (75 loc) · 2.52 KB
/
editorConfig.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
71
72
73
74
75
76
import Codecup from '@calumk/editorjs-codecup';
import Embed from '@editorjs/embed';
import Header from '@editorjs/header';
import ImageTool from '@editorjs/image';
import InlineCode from '@editorjs/inline-code';
import List from '@editorjs/list';
import Quote from '@editorjs/quote';
import RawTool from '@editorjs/raw';
import ImageGallery from 'editorjs-gallery';
import MentionsTool from '../MentionsTool.js';
export const editorToolConfig = {
header: Header,
embed: {
class: Embed,
config: {
services: {
twitter: true,
youtube: true,
w3igg: {
regex: /https:\/\/(?:www\.)?web3isgoinggreat\.com\/\?id=([^/?&]*)/,
embedUrl: 'https://www.web3isgoinggreat.com/embed/<%= remote_id %>',
html: "<iframe frameborder='0' sandbox=''>",
width: 600,
height: 600,
},
},
},
},
gallery: {
class: ImageGallery,
config: {
endpoints: {
byFile: '/dynamic-api/micro/image/byFile',
byUrl: '/dynamic-api/micro/image/byUrl',
},
},
types: 'image/*, video/*',
actions: [
{
name: 'white',
icon: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z" /></svg>',
title: 'Has white background',
toggle: true,
},
],
},
image: {
class: ImageTool,
config: {
endpoints: {
byFile: '/dynamic-api/micro/image/byFile',
byUrl: '/dynamic-api/micro/image/byUrl',
},
types: 'image/*, video/*',
actions: [
{
name: 'white',
icon: '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z" /></svg>',
title: 'Has white background',
toggle: true,
},
],
},
},
code: Codecup,
inlineCode: InlineCode,
list: {
class: List,
inlineToolbar: true,
config: { defaultStyle: 'unordered' },
},
mentions: MentionsTool,
quote: Quote,
raw: RawTool,
};