Method for allowing full HTML/Markup in Table View

I'm attempting to create a ticketing program for my panel and thought it would make sense to use a table for any comments on the ticket. However, an issue arises whenever any real formatting comes into play for the comments. Take for example the following code used in my relation manager for the ticket comments (ignoring that card and enableDownload are depreciated):
public function form(Form $form): Form
{
return $form
->schema([
Card::make()->schema([
Forms\Components\RichEditor::make('comment')
->required()
->maxLength(255),
Forms\Components\FileUpload::make('attachments')
->directory('comment-attachments/' . date('m-y'))
->maxSize(2000)
->enableDownload(),
])
]);
}

public function table(Table $table): Table
{
return $table
->columns([
Stack::make([
Split::make([
TextColumn::make('user.name')
->translateLabel()
->color('primary')
->weight('bold')
->description(fn (Comments $record): string => $record->created_at, position: 'below')
->grow(false),
]),
TextColumn::make('comment')
->wrap()
->html(),
]),
])
->filters([])

// -- more stuff
}
public function form(Form $form): Form
{
return $form
->schema([
Card::make()->schema([
Forms\Components\RichEditor::make('comment')
->required()
->maxLength(255),
Forms\Components\FileUpload::make('attachments')
->directory('comment-attachments/' . date('m-y'))
->maxSize(2000)
->enableDownload(),
])
]);
}

public function table(Table $table): Table
{
return $table
->columns([
Stack::make([
Split::make([
TextColumn::make('user.name')
->translateLabel()
->color('primary')
->weight('bold')
->description(fn (Comments $record): string => $record->created_at, position: 'below')
->grow(false),
]),
TextColumn::make('comment')
->wrap()
->html(),
]),
])
->filters([])

// -- more stuff
}
The output displays the comments, but the comments are devoid of any real formatting. Is there a way to override the default table formatting behavior? Alternatively, would a repeater be best for this? If so, any good examples I can follow?
1 Reply
Steve_OH
Steve_OH4mo ago
I ended up using an infolist with the comments plugin, though I would like to know if this is possible using stock plugins etc.