nova-text-copy-field
nova-text-copy-field copied to clipboard
Nova 4 support
Preflight
- [ ] I have searched the repo for this duplicates
Description
Possible implementation ideas
Nova 4 has a copyable()
function, see https://nova.laravel.com/docs/4.0/resources/fields.html#copying-text-field-values-to-the-clipboard
@flowan This does not solve the problem of wanting to be able to mask the text that you want to copy, so I don't think this is a valuable substitution for this package.
@sixlive Do you think you could upgrade the package to be compatible with Nova 4?
Hey!
I haven't worked in Nova for awhile and don't currently have a license. I'd be happy to accept a PR to update support!
@niels-bosman: Why do you think, that you can't use the build in function? Just use a computed field, something like this:
Text::make("copyTag", function ($model) {
return $model->first_name.' '.$model->last_name;
})->copyable();
@niels-bosman: Why do you think, that you can't use the build in function? Just use a computed field, something like this:
Text::make("copyTag", function ($model) { return $model->first_name.' '.$model->last_name; })->copyable();
@bernhardh This will make the text visible to the end user, which I don't want.
@niels-bosman In case you still need a Nova 4 compatible replacement to the mask()
method, you could use the displayedAs
meta attribute :
Text::make('copyTag')->withMeta(['displayedAs' => '******'])->copyable();