File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
packages/notion-compat/src Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { convertColor } from './convert-color'
55import { convertRichText } from './convert-rich-text'
66import { convertTime } from './convert-time'
77
8+
89export function convertBlock ( {
910 block : partialBlock ,
1011 children = [ ] ,
@@ -460,9 +461,15 @@ export function convertBlock({
460461 }
461462
462463 case 'image' :
463- // no-op
464- // TODO: handle formatting
465- break
464+ // TODO : Add image format
465+ if ( block . image ) {
466+ compatBlock . properties . source = [ [ block . image . file ?. url || block . image . external ?. url ] ]
467+ if ( block . image . caption ) {
468+ compatBlock . properties . caption = block . image . caption . map ( caption => convertRichText ( caption ) )
469+ }
470+ }
471+ break
472+
466473
467474 case 'audio' :
468475 // no-op
You can’t perform that action at this time.
0 commit comments