File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
examples/05-custom-schema/04-pdf-file-block Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ import {
66 FileAndCaptionWrapper ,
77 ReactCustomBlockRenderProps ,
88} from "@blocknote/react" ;
9-
109import { RiFilePdfFill } from "react-icons/ri" ;
1110
11+ import "./styles.css" ;
12+
1213export const PDFPreview = (
1314 props : Omit <
1415 ReactCustomBlockRenderProps < FileBlockConfig , any , any > ,
@@ -21,8 +22,6 @@ export const PDFPreview = (
2122 src = { props . block . props . url }
2223 contentEditable = { false }
2324 draggable = { false }
24- height = { props . editor . domElement . clientWidth * 1.5 }
25- width = { props . editor . domElement . clientWidth }
2625 onClick = { ( ) => props . editor . setTextCursorPosition ( props . block ) }
2726 />
2827 ) ;
Original file line number Diff line number Diff line change 1+ [data-content-type = "pdf" ] .bn-file-block-content-wrapper ,
2+ [data-content-type = "pdf" ] .bn-file-and-caption-wrapper {
3+ height : 800px ;
4+ width : 100% ;
5+ }
6+
7+ [data-content-type = "pdf" ] embed {
8+ height : 100% ;
9+ width : 100% ;
10+ }
You can’t perform that action at this time.
0 commit comments