Browse Source

260311 修改編輯器提示

OMEGA\lulufj.ho 3 weeks ago
parent
commit
04cf551c3d
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      app/Filament/Resources/NewsResource.php

+ 1
- 1
app/Filament/Resources/NewsResource.php View File

213
                         Group::make()->schema([
213
                         Group::make()->schema([
214
                             FilamentLexicalEditor::make('text_content_tw')
214
                             FilamentLexicalEditor::make('text_content_tw')
215
                                 // ->label('繁體中文內容')
215
                                 // ->label('繁體中文內容')
216
-                                ->label(new \Illuminate\Support\HtmlString('繁體中文內容  <a href="' . asset('images/tool-bar.png') . '", target="_blank">工具列說明</a>'))
216
+                                ->label(new \Illuminate\Support\HtmlString('繁體中文內容 <p href="#" style="cursor:pointer;color:blue;" onclick="var img = this.closest(\'div\').querySelector(\'img\');img.style.display = (img.style.display === \'none\') ? \'block\' : \'none\';"> 工具列說明</p><img src="' . asset('images/tool-bar.png') . '" style="display:none;">'))
217
                                 ->id(fn ($get) => "text_content_tw_" . $get('item_key') . "_" . uniqid())
217
                                 ->id(fn ($get) => "text_content_tw_" . $get('item_key') . "_" . uniqid())
218
                                 ->enabledToolbars([
218
                                 ->enabledToolbars([
219
                                     ToolbarItem::UNDO, ToolbarItem::REDO, ToolbarItem::NORMAL,
219
                                     ToolbarItem::UNDO, ToolbarItem::REDO, ToolbarItem::NORMAL,