Skip to content

Commit

Permalink
Attachments: show when attaching a rich table or rich html. #286
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Jan 16, 2024
1 parent 7ebeea3 commit 48f0395
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ function attachmentConverterIcon(attachment: Attachment) {
}

function attachmentLabelText(attachment: Attachment): string {
const converter = attachment.converterIdx !== null ? attachment.converters[attachment.converterIdx] ?? null : null;
if (converter && attachment.label === 'Rich Text') {
if (converter.id === 'rich-text-table')
return 'Rich Table';
if (converter.id === 'rich-text')
return 'Rich HTML';
}
return ellipsizeFront(attachment.label, 24);
}

Expand Down

0 comments on commit 48f0395

Please sign in to comment.