I would like to display text area resource field content always without showing option "Show Content" or display it by default.
Is it possible?
There is now an option to always show.
Textarea::make('Title')->alwaysShow()
You cannot. If you take a look at the TextareaField.vue
(nova/resources/js/components/Detail/TextareaField.vue):
<template>
<panel-item :field="field">
<template slot="value">
<excerpt :content="field.value" />
</template>
</panel-item>
</template>
Then if you take a look at Excerpt.vue
(nova/resources/js/components/Excerpt.vue):
<div v-if="hasContent">
<div v-if="expanded" class="markdown leading-normal" v-html="content" />
<a
@click="toggle"
class="cursor-pointer dim inline-block text-primary font-bold"
:class="{ 'mt-6': expanded }"
aria-role="button"
>
{{ showHideLabel }}
</a>
</div>
And the props of the vue:
props: {
content: {
type: String,
},
},
data: () => ({ expanded: false }),
There's no option to pass the expanded attribute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With