Skip to content

Commit

Permalink
Apply latest Voyager changes
Browse files Browse the repository at this point in the history
  • Loading branch information
emptynick committed May 9, 2021
1 parent 05ebf71 commit 0f33273
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Tiptap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Route;
use Illuminate\View\View;
use Voyager\Admin\Contracts\Formfields\Formfield;
use Voyager\Admin\Classes\Formfield;
use Voyager\Admin\Contracts\Plugins\FormfieldPlugin;

class Tiptap implements FormfieldPlugin
Expand Down
8 changes: 4 additions & 4 deletions src/TiptapFormfield.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Emptynick\Tiptap;

use Voyager\Admin\Contracts\Formfields\Formfield;
use Voyager\Admin\Contracts\Formfields\Features\ManipulateData\Browse;
use Illuminate\Support\Str;
use Voyager\Admin\Classes\Formfield;

class TiptapFormfield implements Formfield, Browse
class TiptapFormfield extends Formfield
{
public function type(): string
{
Expand All @@ -19,7 +19,7 @@ public function name(): string

public function browse($input)
{
return substr(strip_tags($input), 0, $this->options->display_length ?? 150);
return Str::limit(strip_tags($input), $this->options->display_length ?? 150);
}

public function getComponentName(): string {
Expand Down

0 comments on commit 0f33273

Please sign in to comment.