Skip to content

Commit

Permalink
fixed tinymce code sample
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to committed Jan 28, 2023
1 parent f9887a8 commit 6be7f72
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/Fields/TinyMce.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Leeto\MoonShine\Fields;

use Illuminate\Database\Eloquent\Model;

final class TinyMce extends Field
{
protected static string $view = 'moonshine::fields.tinymce';
Expand Down Expand Up @@ -78,4 +80,12 @@ protected function version(): string
{
return (string) config('moonshine.tinymce.version', 6);
}

public function formViewValue(Model $item): string
{
return str(parent::formViewValue($item))->replace(
['&', '<', '>', ' ', '"'],
['&', '<', '>', ' ', '"']
)->value();
}
}
4 changes: 2 additions & 2 deletions src/Traits/Fields/NumberTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

trait NumberTrait
{
public int|float $min = 1;
public int|float $min = 0;

public int|float $max = 1000;
public int|float $max = 1e10;

public int|float $step = 1;

Expand Down

0 comments on commit 6be7f72

Please sign in to comment.