Skip to content

Commit

Permalink
Attachments target octet-stream content type (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancolgate authored Sep 13, 2023
1 parent 59d6a54 commit 9ef7f2c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/exports/extensions/attachment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ export const Attachment = Node.create<AttachmentOptions>({
// Generated by #to_trix_html
{
tag: "figure[data-trix-attachment]",
getAttrs: (element) => {
if (findAttribute(element, "contentType") == "application/octet-stream") {

Check failure on line 250 in src/exports/extensions/attachment.ts

View workflow job for this annotation

GitHub Actions / Release (18.x)

Argument of type 'string | HTMLElement' is not assignable to parameter of type 'HTMLElement'.
return true;
}
return false;
},
// contentElement: "figcaption"
},
// Generated by the standard output.
Expand Down

0 comments on commit 9ef7f2c

Please sign in to comment.