Skip to content

Commit

Permalink
Adds placeholder support
Browse files Browse the repository at this point in the history
  • Loading branch information
JKHarley committed Nov 29, 2022
1 parent 0d2aa7e commit 6e93d1b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `filament-trumbowyg` will be documented in this file.

## 0.2.0 - 2022-11-29

- Adds support for placeholder text

## 0.1.0 - 2022-11-27

- Initial release with default toolbar and theme.
3 changes: 3 additions & 0 deletions resources/views/trumbowyg.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<textarea
x-on:{{ $getLabel() }}.window="(e) => state = e.detail.text"
id="{{ $getLabel() }}"
@if (!is_null($getPlaceholder()))
placeholder="{{ $getPlaceholder() }}";
@endif
></textarea>
</div>
</x-dynamic-component>
Expand Down
4 changes: 4 additions & 0 deletions src/Trumbowyg.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

namespace JKHarley\FilamentTrumbowyg;

use Filament\Forms\Components\Concerns\HasPlaceholder;

class Trumbowyg extends \Filament\Forms\Components\Field
{
use HasPlaceholder;

protected string $view = 'filament-trumbowyg::trumbowyg';
}

0 comments on commit 6e93d1b

Please sign in to comment.