forked from marktext/marktext
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathformat.js
More file actions
111 lines (110 loc) · 3.12 KB
/
format.js
File metadata and controls
111 lines (110 loc) · 3.12 KB
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
109
110
111
import * as actions from '../actions/format'
export default function (keybindings) {
return {
id: 'formatMenuItem',
label: 'F&ormat',
submenu: [{
id: 'strongMenuItem',
label: 'Bold',
type: 'checkbox',
accelerator: keybindings.getAccelerator('format.strong'),
click (menuItem, focusedWindow) {
actions.strong(focusedWindow)
}
}, {
id: 'emphasisMenuItem',
label: 'Italic',
type: 'checkbox',
accelerator: keybindings.getAccelerator('format.emphasis'),
click (menuItem, focusedWindow) {
actions.emphasis(focusedWindow)
}
}, {
id: 'underlineMenuItem',
label: 'Underline',
type: 'checkbox',
accelerator: keybindings.getAccelerator('format.underline'),
click (menuItem, focusedWindow) {
actions.underline(focusedWindow)
}
}, {
type: 'separator'
}, {
id: 'superscriptMenuItem',
label: 'Superscript',
type: 'checkbox',
accelerator: keybindings.getAccelerator('format.superscript'),
click (menuItem, focusedWindow) {
actions.superscript(focusedWindow)
}
}, {
id: 'subscriptMenuItem',
label: 'Subscript',
type: 'checkbox',
accelerator: keybindings.getAccelerator('format.subscript'),
click (menuItem, focusedWindow) {
actions.subscript(focusedWindow)
}
}, {
id: 'highlightMenuItem',
label: 'Highlight',
type: 'checkbox',
accelerator: keybindings.getAccelerator('format.highlight'),
click (menuItem, focusedWindow) {
actions.highlight(focusedWindow)
}
}, {
type: 'separator'
}, {
id: 'inlineCodeMenuItem',
label: 'Inline Code',
type: 'checkbox',
accelerator: keybindings.getAccelerator('format.inline-code'),
click (menuItem, focusedWindow) {
actions.inlineCode(focusedWindow)
}
}, {
id: 'inlineMathMenuItem',
label: 'Inline Math',
type: 'checkbox',
accelerator: keybindings.getAccelerator('format.inline-math'),
click (menuItem, focusedWindow) {
actions.inlineMath(focusedWindow)
}
}, {
type: 'separator'
}, {
id: 'strikeMenuItem',
label: 'Strikethrough',
type: 'checkbox',
accelerator: keybindings.getAccelerator('format.strike'),
click (menuItem, focusedWindow) {
actions.strikethrough(focusedWindow)
}
}, {
id: 'hyperlinkMenuItem',
label: 'Hyperlink',
type: 'checkbox',
accelerator: keybindings.getAccelerator('format.hyperlink'),
click (menuItem, focusedWindow) {
actions.hyperlink(focusedWindow)
}
}, {
id: 'imageMenuItem',
label: 'Image',
type: 'checkbox',
accelerator: keybindings.getAccelerator('format.image'),
click (menuItem, focusedWindow) {
actions.image(focusedWindow)
}
}, {
type: 'separator'
}, {
label: 'Clear Formatting',
accelerator: keybindings.getAccelerator('format.clear-format'),
click (menuItem, focusedWindow) {
actions.clearFormat(focusedWindow)
}
}]
}
}