fix(core): only enable attachment preview for pdf (#10584)
This commit is contained in:
@@ -30,7 +30,11 @@ import { AttachmentEmbedProvider } from './embed.js';
|
|||||||
import { styles } from './styles.js';
|
import { styles } from './styles.js';
|
||||||
import { checkAttachmentBlob, downloadAttachmentBlob } from './utils.js';
|
import { checkAttachmentBlob, downloadAttachmentBlob } from './utils.js';
|
||||||
|
|
||||||
@Peekable()
|
@Peekable({
|
||||||
|
enableOn: ({ model }: AttachmentBlockComponent) => {
|
||||||
|
return model.type.endsWith('pdf');
|
||||||
|
},
|
||||||
|
})
|
||||||
export class AttachmentBlockComponent extends CaptionedBlockComponent<AttachmentBlockModel> {
|
export class AttachmentBlockComponent extends CaptionedBlockComponent<AttachmentBlockModel> {
|
||||||
static override styles = styles;
|
static override styles = styles;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user