|
|
@@ -1,212 +0,0 @@
|
|
1
|
|
-@props(['toolbar' => '' ])
|
|
2
|
|
-@php
|
|
3
|
|
- use Malzariey\FilamentLexicalEditor\Enums\ToolbarItem;
|
|
4
|
|
- $item = $toolbar instanceof ToolbarItem ? $toolbar : ToolbarItem::from($toolbar);
|
|
5
|
|
-@endphp
|
|
6
|
|
-@switch($item)
|
|
7
|
|
- @case(ToolbarItem::UNDO)
|
|
8
|
|
- <x-filament-lexical-editor::toolbar-item ref="undo" disable-option="cannotUndo"
|
|
9
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.undo') }}" shortcut="Ctrl+Z" icon="undo"/>
|
|
10
|
|
- @break
|
|
11
|
|
- @case(ToolbarItem::REDO)
|
|
12
|
|
- <x-filament-lexical-editor::toolbar-item ref="redo" disable-option="cannotRedo"
|
|
13
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.redo') }}" shortcut="Ctrl+Y" icon="redo"/>
|
|
14
|
|
- @break
|
|
15
|
|
- @case(ToolbarItem::FONT_FAMILY)
|
|
16
|
|
- <div class="relative w-52 h-11 py-1">
|
|
17
|
|
- <select x-ref="fontFamily" class="toolbar-item spaced font-family"
|
|
18
|
|
- x-tooltip="'{{ __('filament-lexical-editor::lexical-editor.font_family') }}'">
|
|
19
|
|
- <option value="Arial" style="font-family: Arial,serif">Arial</option>
|
|
20
|
|
- <option value="Courier New" style="font-family: 'Courier New',serif">Courier New</option>
|
|
21
|
|
- <option value="Georgia" style="font-family: Georgia,serif">Georgia</option>
|
|
22
|
|
- <option value="Times New Roman" style="font-family: 'Times New Roman',serif">Times New Roman</option>
|
|
23
|
|
- <option value="Verdana" style="font-family: Verdana,serif">Verdana</option>
|
|
24
|
|
- </select>
|
|
25
|
|
-
|
|
26
|
|
- </div>
|
|
27
|
|
-
|
|
28
|
|
-
|
|
29
|
|
- @break
|
|
30
|
|
- @case(ToolbarItem::NORMAL)
|
|
31
|
|
- <x-filament-lexical-editor::toolbar-item active-option="blockType == 'paragraph'" ref="normal"
|
|
32
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.normal') }}" shortcut="Ctrl+Alt+0"
|
|
33
|
|
- icon="paragraph"/>
|
|
34
|
|
- @break
|
|
35
|
|
- @case(ToolbarItem::H1)
|
|
36
|
|
- <x-filament-lexical-editor::toolbar-item active-option="blockType == 'h1'" ref="h1"
|
|
37
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.heading_1') }}" shortcut="Ctrl+Alt+1"
|
|
38
|
|
- icon="h1"/>
|
|
39
|
|
- @break
|
|
40
|
|
- @case(ToolbarItem::H2)
|
|
41
|
|
- <x-filament-lexical-editor::toolbar-item ref="h2" active-option="blockType == 'h2'"
|
|
42
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.heading_2') }}" shortcut="Ctrl+Alt+2"
|
|
43
|
|
- icon="h2"/>
|
|
44
|
|
- @break
|
|
45
|
|
- @case(ToolbarItem::H3)
|
|
46
|
|
- <x-filament-lexical-editor::toolbar-item ref="h3" active-option="blockType == 'h3'"
|
|
47
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.heading_3') }}" shortcut="Ctrl+Alt+3"
|
|
48
|
|
- icon="h3"/>
|
|
49
|
|
- @break
|
|
50
|
|
- @case(ToolbarItem::H4)
|
|
51
|
|
- <x-filament-lexical-editor::toolbar-item ref="h4" active-option="blockType == 'h4'"
|
|
52
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.heading_4') }}" shortcut="Ctrl+Alt+4"
|
|
53
|
|
- icon="h4"/>
|
|
54
|
|
- @break
|
|
55
|
|
- @case(ToolbarItem::H5)
|
|
56
|
|
- <x-filament-lexical-editor::toolbar-item ref="h5" active-option="blockType == 'h5'"
|
|
57
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.heading_5') }}" shortcut="Ctrl+Alt+5"
|
|
58
|
|
- icon="h5"/>
|
|
59
|
|
- @break
|
|
60
|
|
- @case(ToolbarItem::H6)
|
|
61
|
|
- <x-filament-lexical-editor::toolbar-item ref="h6" active-option="blockType == 'h6'"
|
|
62
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.heading_6') }}" shortcut="Ctrl+Alt+6"
|
|
63
|
|
- icon="h6"/>
|
|
64
|
|
- @break
|
|
65
|
|
- @case(ToolbarItem::BULLET)
|
|
66
|
|
- <x-filament-lexical-editor::toolbar-item ref="bullet" active-option="blockType == 'bullet'"
|
|
67
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.bullet_list') }}" shortcut="Ctrl+Alt+7"
|
|
68
|
|
- icon="bullet-list"/>
|
|
69
|
|
- @break
|
|
70
|
|
- @case(ToolbarItem::NUMBERED)
|
|
71
|
|
- <x-filament-lexical-editor::toolbar-item ref="numbered" active-option="blockType == 'number'"
|
|
72
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.numbered_list') }}" shortcut="Ctrl+Alt+8"
|
|
73
|
|
- icon="numbered-list"/>
|
|
74
|
|
- @break
|
|
75
|
|
- @case(ToolbarItem::QUOTE)
|
|
76
|
|
- <x-filament-lexical-editor::toolbar-item ref="quote" active-option="blockType == 'quote'"
|
|
77
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.quote') }}" shortcut="Ctrl+Alt+Q" icon="quote"/>
|
|
78
|
|
- @break
|
|
79
|
|
- @case(ToolbarItem::CODE)
|
|
80
|
|
- <x-filament-lexical-editor::toolbar-item ref="code" active-option="blockType == 'code'"
|
|
81
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.code_block') }}" shortcut="Ctrl+Alt+C"
|
|
82
|
|
- icon="code"/>
|
|
83
|
|
- @break
|
|
84
|
|
- @case(ToolbarItem::FONT_SIZE)
|
|
85
|
|
- <x-filament-lexical-editor::toolbar-item ref="decrement" class="font-decrement"
|
|
86
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.decrease_font_size') }}" shortcut="Ctrl+Shift+,"
|
|
87
|
|
- icon-class="format" icon="minus-icon"/>
|
|
88
|
|
- <input type="number" title="Font size" x-ref="fontSize" class="toolbar-item font-size-input w-16 " min="8"
|
|
89
|
|
- max="72" value="15">
|
|
90
|
|
- <x-filament-lexical-editor::toolbar-item ref="increment" class="font-increment"
|
|
91
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.increase_font_size') }}" shortcut="Ctrl+Shift+."
|
|
92
|
|
- icon-class="format" icon="add-icon"/>
|
|
93
|
|
- @break
|
|
94
|
|
- @case(ToolbarItem::BOLD)
|
|
95
|
|
- <x-filament-lexical-editor::toolbar-item active-option="isBold" ref="bold" title="{{ __('filament-lexical-editor::lexical-editor.bold') }}"
|
|
96
|
|
- shortcut="Ctrl+B" icon="bold"/>
|
|
97
|
|
- @break
|
|
98
|
|
- @case(ToolbarItem::ITALIC)
|
|
99
|
|
- <x-filament-lexical-editor::toolbar-item active-option="isItalic" ref="italic"
|
|
100
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.italic') }}" shortcut="Ctrl+I" icon="italic"/>
|
|
101
|
|
- @break
|
|
102
|
|
- @case(ToolbarItem::UNDERLINE)
|
|
103
|
|
- <x-filament-lexical-editor::toolbar-item active-option="isUnderline" ref="underline"
|
|
104
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.underline') }}" shortcut="Ctrl+U"
|
|
105
|
|
- icon="underline"/>
|
|
106
|
|
- @break
|
|
107
|
|
- @case(ToolbarItem::ICODE)
|
|
108
|
|
- <x-filament-lexical-editor::toolbar-item active-option="isCode" ref="icode"
|
|
109
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.insert_code_block') }}" shortcut="Ctrl+Shift+C"
|
|
110
|
|
- icon="code"/>
|
|
111
|
|
- @break
|
|
112
|
|
- @case(ToolbarItem::LINK)
|
|
113
|
|
- <x-filament-lexical-editor::toolbar-item active-option="isLink" ref="link"
|
|
114
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.insert_link') }}" shortcut="Ctrl+K"
|
|
115
|
|
- icon="link"/>
|
|
116
|
|
- @break
|
|
117
|
|
- @case(ToolbarItem::TEXT_COLOR)
|
|
118
|
|
- <x-filament-lexical-editor::text-color-dialog ref="text_color" icon="font-color"
|
|
119
|
|
- :title="__('filament-lexical-editor::lexical-editor.formatting_text_color')"/>
|
|
120
|
|
- @break
|
|
121
|
|
- @case(ToolbarItem::BACKGROUND_COLOR)
|
|
122
|
|
- <x-filament-lexical-editor::text-color-dialog ref="background_color" icon="bg-color"
|
|
123
|
|
- :title="__('filament-lexical-editor::lexical-editor.formatting_background_color')"/>
|
|
124
|
|
- @break
|
|
125
|
|
- @case(ToolbarItem::LOWERCASE)
|
|
126
|
|
- <x-filament-lexical-editor::toolbar-item active-option="isLowercase" ref="lowercase"
|
|
127
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.lowercase') }}" shortcut="Ctrl+Shift+1"
|
|
128
|
|
- icon="lowercase"/>
|
|
129
|
|
- @break
|
|
130
|
|
- @case(ToolbarItem::UPPERCASE)
|
|
131
|
|
- <x-filament-lexical-editor::toolbar-item active-option="isUppercase" ref="uppercase"
|
|
132
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.uppercase') }}" shortcut="Ctrl+Shift+2"
|
|
133
|
|
- icon="uppercase"/>
|
|
134
|
|
- @break
|
|
135
|
|
- @case(ToolbarItem::CAPITALIZE)
|
|
136
|
|
- <x-filament-lexical-editor::toolbar-item active-option="isCapitalize" ref="capitalize"
|
|
137
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.capitalize') }}" shortcut="Ctrl+Shift+3"
|
|
138
|
|
- icon="capitalize"/>
|
|
139
|
|
- @break
|
|
140
|
|
- @case(ToolbarItem::STRIKETHROUGH)
|
|
141
|
|
- <x-filament-lexical-editor::toolbar-item active-option="isStrikethrough" ref="strikethrough"
|
|
142
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.strikethrough') }}" shortcut="Ctrl+Shift+S"
|
|
143
|
|
- icon="strikethrough"/>
|
|
144
|
|
- @break
|
|
145
|
|
- @case(ToolbarItem::SUBSCRIPT)
|
|
146
|
|
- <x-filament-lexical-editor::toolbar-item active-option="isSubscript" ref="subscript"
|
|
147
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.subscript') }}" shortcut="Ctrl+,"
|
|
148
|
|
- icon="subscript"/>
|
|
149
|
|
- @break
|
|
150
|
|
- @case(ToolbarItem::SUPERSCRIPT)
|
|
151
|
|
- <x-filament-lexical-editor::toolbar-item active-option="isSuperscript" ref="superscript"
|
|
152
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.superscript') }}" shortcut="Ctrl+."
|
|
153
|
|
- icon="superscript"/>
|
|
154
|
|
- @break
|
|
155
|
|
- @case(ToolbarItem::CLEAR)
|
|
156
|
|
- <x-filament-lexical-editor::toolbar-item ref="clear" title="{{ __('filament-lexical-editor::lexical-editor.clear_text_formatting') }}"
|
|
157
|
|
- shortcut="Ctrl+/" icon="clear"/>
|
|
158
|
|
- @break
|
|
159
|
|
- @case(ToolbarItem::LEFT)
|
|
160
|
|
- <x-filament-lexical-editor::toolbar-item active-option="elementFormat == 'left'" ref="left" rtl-ref="right"
|
|
161
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.left_align') }}"
|
|
162
|
|
- rtl-title="{{ __('filament-lexical-editor::lexical-editor.right_align') }}" shortcut="Ctrl+Shift+L"
|
|
163
|
|
- rtl-shortcut="Ctrl+Shift+R" icon="left-align" rtl-icon="right-align"/>
|
|
164
|
|
- @break
|
|
165
|
|
- @case(ToolbarItem::CENTER)
|
|
166
|
|
- <x-filament-lexical-editor::toolbar-item active-option="elementFormat == 'center'" ref="center"
|
|
167
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.center_align') }}" shortcut="Ctrl+Shift+E"
|
|
168
|
|
- icon="center-align"/>
|
|
169
|
|
- @break
|
|
170
|
|
- @case(ToolbarItem::RIGHT)
|
|
171
|
|
- <x-filament-lexical-editor::toolbar-item active-option="elementFormat == 'right'" ref="right" rtl-ref="left"
|
|
172
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.right_align') }}"
|
|
173
|
|
- rtl-title="{{ __('filament-lexical-editor::lexical-editor.left_align') }}" shortcut="Ctrl+Shift+R"
|
|
174
|
|
- rtl-shortcut="Ctrl+Shift+L" icon="right-align" rtl-icon="left-align"/>
|
|
175
|
|
- @break
|
|
176
|
|
- @case(ToolbarItem::JUSTIFY)
|
|
177
|
|
- <x-filament-lexical-editor::toolbar-item active-option="elementFormat == 'justify'" ref="justify"
|
|
178
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.justify_align') }}" shortcut="Ctrl+Shift+J"
|
|
179
|
|
- icon="justify-align"/>
|
|
180
|
|
- @break
|
|
181
|
|
- @case(ToolbarItem::START)
|
|
182
|
|
- <x-filament-lexical-editor::toolbar-item active-option="elementFormat == 'start'" ref="start" rtl-ref="end"
|
|
183
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.start_align') }}"
|
|
184
|
|
- rtl-title="{{ __('filament-lexical-editor::lexical-editor.end_align') }}" shortcut="Ctrl+Shift+["
|
|
185
|
|
- rtl-shortcut="Ctrl+Shift+]" icon="left-align" rtl-icon="right-align"/>
|
|
186
|
|
- @break
|
|
187
|
|
- @case(ToolbarItem::END)
|
|
188
|
|
- <x-filament-lexical-editor::toolbar-item active-option="elementFormat == 'end'" ref="end" rtl-ref="start"
|
|
189
|
|
- title="{{ __('filament-lexical-editor::lexical-editor.end_align') }}"
|
|
190
|
|
- rtl-title="{{ __('filament-lexical-editor::lexical-editor.start_align') }}" shortcut="Ctrl+Shift+]"
|
|
191
|
|
- rtl-shortcut="Ctrl+Shift+[" icon="right-align" rtl-icon="left-align"/>
|
|
192
|
|
- @break
|
|
193
|
|
- @case(ToolbarItem::INDENT)
|
|
194
|
|
- <x-filament-lexical-editor::toolbar-item ref="indent" title="{{ __('filament-lexical-editor::lexical-editor.indent') }}" shortcut="Ctrl+]"
|
|
195
|
|
- icon="indent"/>
|
|
196
|
|
- @break
|
|
197
|
|
- @case(ToolbarItem::OUTDENT)
|
|
198
|
|
- <x-filament-lexical-editor::toolbar-item ref="outdent" title="{{ __('filament-lexical-editor::lexical-editor.outdent') }}" shortcut="Ctrl+["
|
|
199
|
|
- icon="outdent"/>
|
|
200
|
|
- @break
|
|
201
|
|
- @case(ToolbarItem::HR)
|
|
202
|
|
- <x-filament-lexical-editor::toolbar-item ref="hr" title="{{ __('filament-lexical-editor::lexical-editor.hr') }}" shortcut=""
|
|
203
|
|
- icon="horizontal-rule"/>
|
|
204
|
|
- @break
|
|
205
|
|
- @case(ToolbarItem::IMAGE)
|
|
206
|
|
- <x-filament-lexical-editor::toolbar-item ref="image" title="{{ __('filament-lexical-editor::lexical-editor.image') }}" shortcut=""
|
|
207
|
|
- icon="image"/>
|
|
208
|
|
- @break
|
|
209
|
|
- @case(ToolbarItem::DIVIDER)
|
|
210
|
|
- <div class="divider"></div>
|
|
211
|
|
- @break
|
|
212
|
|
-@endswitch
|