-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheditorTools.ts
62 lines (52 loc) · 1.11 KB
/
editorTools.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
57
58
59
60
61
62
import type User from './user.js';
/**
* Plugin that connects to the editor based on user settings
*/
export default interface EditorTool {
/**
* Unique identifier of the tool. Nano-ID
*/
id: string;
/**
* Technical name of the tool, like 'header', 'list', 'linkTool'
*/
name: string;
/**
* User-friendly plugin title
*/
title: string;
/**
* Name of the tool class. Since it's imported globally,
* we need the class name to properly connect the tool to the editor
*/
exportName: string;
/**
* Description of the tool. It's shown in the marketplace
*/
description?: string;
/**
* S3 key to the tool cover image
*/
cover?: string;
/**
* User id that added the tool to the marketplace
*/
userId: User['id'] | null;
/**
* Is plugin included by default in the editor
*/
isDefault?: boolean;
/**
* Source of the tool to get it's code
*/
source: {
/**
* Tool URL in content delivery network
*/
cdn?: string;
};
}
/**
* Editor tool creation attributes
*/
export type EditorToolCreationAttributes = Omit<EditorTool, 'id'>;