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 {
6
6
FileAndCaptionWrapper ,
7
7
ReactCustomBlockRenderProps ,
8
8
} from "@blocknote/react" ;
9
-
10
9
import { RiFilePdfFill } from "react-icons/ri" ;
11
10
11
+ import "./styles.css" ;
12
+
12
13
export const PDFPreview = (
13
14
props : Omit <
14
15
ReactCustomBlockRenderProps < FileBlockConfig , any , any > ,
@@ -21,8 +22,6 @@ export const PDFPreview = (
21
22
src = { props . block . props . url }
22
23
contentEditable = { false }
23
24
draggable = { false }
24
- height = { props . editor . domElement . clientWidth * 1.5 }
25
- width = { props . editor . domElement . clientWidth }
26
25
onClick = { ( ) => props . editor . setTextCursorPosition ( props . block ) }
27
26
/>
28
27
) ;
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