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

Trix field questions #287

Closed
thegregthomp opened this issue Aug 28, 2018 · 4 comments
Closed

Trix field questions #287

thegregthomp opened this issue Aug 28, 2018 · 4 comments

Comments

@thegregthomp
Copy link

thegregthomp commented Aug 28, 2018

Two questions related to this field:

1: The field always starts in a "Show Content" state. I'd like the content to show by default. Is this possible?
image

2: Is it possible to have the field always editable, even if you're not in the editable state for the resource? I know this is a long shot but just asking. Thanks!

@albalooshi
Copy link

Warning this is a quick hack, and needs to be done at every update until the original developers give an option to do that.

In public/nova-assets/app.js

Search for data:function(){return{expanded:!1}} and remove the ! , an example: data:function(){return{expanded:1}}

@davidhemphill
Copy link
Contributor

  1. Yes. Added and will be included in an upcoming release.
  2. No.

@albalooshi
Copy link

@davidhemphill
Hi David, I cant find the documentation for "Allow Textarea, Markdown, and Trix fields to always show content if desired.", can you please give an example hows thats done?

@bonzai
Copy link

bonzai commented Oct 2, 2018

@albalooshi: See Laravel\Nova\Fields\Expandable for available methods.

Textarea::make('foobar')->alwaysShow(),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants