emilianotisato / nova-tinymce

Laravel Nova TinyMCE editor (with images upload capabilities!)
MIT License
116 stars 39 forks source link

Show content by default on detail view #35

Closed iMuMz closed 3 years ago

iMuMz commented 4 years ago

Hi,

Is it possible to show the content by default on the detail view of a resource?

emilianotisato commented 4 years ago

Yes this is posible with the normal nova feature ->alwaysShow() https://nova.laravel.com/docs/1.0/resources/fields.html#textarea-field

On Wed, Jun 3, 2020 at 4:21 AM Chad notifications@github.com wrote:

Hi,

Is it possible to show the content by default on the detail view of a resource?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/emilianotisato/nova-tinymce/issues/35, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEN4C57TSHM6WTLN572SE23RUYI2TANCNFSM4NRPPX3A .

-- Emiliano Tisato Cloud Computing & API integration Specialist Google Partner & Analytics Guru Certified (+52) 044 56 1125 9499 emiliano@thormaweb.com

iMuMz commented 4 years ago

I tried the default Nova feature ->alwaysShow() but the method does not exist with the nova-tinymce package.

Screenshot 2020-06-07 at 07 58 03

As a work around, I use the Nova text field and return the content as html :

Text::make('Content', function () {})->onlyOnDetail()->asHtml()

emilianotisato commented 4 years ago

Sorry, do you still have this issue? Can you tell witch nova version you are using?

emilianotisato commented 4 years ago

@iMuMz Does this problem persist on your project? Did you manage to solve it?

iMuMz commented 4 years ago

@emilianotisato Yes I still have this issue but I will use the workaround until I update :

Text::make('Content', function () { return $this->content; })->onlyOnDetail()->asHtml()

Laravel : 6.16.0 Nova: 2.10.1

Screenshot 2020-09-16 at 14 54 02