image-editor.blade.php 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. @php
  2. $id = uniqid();
  3. @endphp
  4. <div x-ref="imageEditorModal" modal-id="{{$id}}">
  5. <x-filament::modal id="{{$id}}">
  6. <x-slot name="heading">
  7. @lang('filament-lexical-editor::lexical-editor.image_editor.update_image')
  8. </x-slot>
  9. <input type="text" class="hidden" id="alt-text" x-ref="image_editor_key" value="" >
  10. <label for="alt-text">@lang('filament-lexical-editor::lexical-editor.image_editor.alt')</label>
  11. <x-filament::input.wrapper
  12. label="Image Upload"
  13. >
  14. <x-filament::input
  15. type="text"
  16. x-ref="image_editor_alt"
  17. />
  18. </x-filament::input.wrapper>
  19. <label for="image_editor_width">@lang('filament-lexical-editor::lexical-editor.image_editor.width')</label>
  20. <x-filament::input.wrapper>
  21. <x-filament::input
  22. type="number"
  23. x-ref="image_editor_width"
  24. />
  25. </x-filament::input.wrapper>
  26. <label for="image_editor_height">@lang('filament-lexical-editor::lexical-editor.image_editor.height')</label>
  27. <x-filament::input.wrapper>
  28. <x-filament::input
  29. type="number"
  30. x-ref="image_editor_height"
  31. />
  32. </x-filament::input.wrapper>
  33. <x-slot name="footerActions">
  34. <div class="dialog-actions ms-auto">
  35. <x-filament::button
  36. @click="$event.preventDefault();updateImage(); close()"
  37. >
  38. @lang('filament-lexical-editor::lexical-editor.edit')
  39. </x-filament::button>
  40. <x-filament::button
  41. @click="$event.preventDefault(); deleteImage(); close()"
  42. color="danger"
  43. >
  44. @lang('filament-lexical-editor::lexical-editor.delete')
  45. </x-filament::button>
  46. <x-filament::button
  47. @click="$event.preventDefault(); close()"
  48. color="gray"
  49. >
  50. @lang('filament-lexical-editor::lexical-editor.cancel')
  51. </x-filament::button>
  52. </div>
  53. </x-slot>
  54. </x-filament::modal>
  55. </div>