Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add events for image uploads #98

Merged
merged 11 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

- Added `EditorJsImageUploaded` event that triggers when an image is uploaded. Via #98 by @woeler.
- Added `EditorJsThumbnailCreated` event that triggers when a thumbnail is generated. Via #98 by @woeler.

## [3.3.0]

- Fixed invalid image reference `image.url` in `views/link.blade.php`, via #101 by @roelofr.
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"codex-team/editor.js": "*",
"guzzlehttp/guzzle": "^6.0 || ^7.0",
"illuminate/support": "^8.0 || ^9.0 || ^10.0",
"illuminate/events": "^8.0 || ^9.0 || ^10.0",
"laravel/nova": "^4.0",
"spatie/image": "^1.7 || ^2.0"
},
Expand Down
123 changes: 70 additions & 53 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions src/Events/EditorJsImageUploaded.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace Advoor\NovaEditorJs\Events;

use Illuminate\Foundation\Events\Dispatchable;

class EditorJsImageUploaded
{
use Dispatchable;

public function __construct(public string $disk, public string $path)
{
}
}
16 changes: 16 additions & 0 deletions src/Events/EditorJsThumbnailCreated.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace Advoor\NovaEditorJs\Events;

use Illuminate\Foundation\Events\Dispatchable;

class EditorJsThumbnailCreated
{
use Dispatchable;

public function __construct(public string $disk, public string $path)
{
}
}
Loading
Loading