File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
blocks/file-blocks/markdown-edit Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ export function makeExtensions({
129129 EditorView . domEventHandlers ( {
130130 paste ( e , view ) {
131131 const value = e . clipboardData ?. items [ 0 ] ;
132- const MAX_IMAGE_SIZE = 5000000 ;
132+ const MAX_URL_SIZE = 5000000 ;
133133 // handle images pasted from the web
134134 if ( value && value . type === "text/html" ) {
135135 value . getAsString ( ( str ) => {
@@ -142,7 +142,7 @@ export function makeExtensions({
142142 from : view . state . selection . main . from ,
143143 to : view . state . selection . main . to ,
144144 insert : images
145- . filter ( ( image ) => image && image . length < MAX_IMAGE_SIZE )
145+ . filter ( ( image ) => image && image . length < MAX_URL_SIZE )
146146 . map ( ( image ) => `` )
147147 . join ( "\n" ) ,
148148 } ,
@@ -158,7 +158,7 @@ export function makeExtensions({
158158 const reader = new FileReader ( ) ;
159159 reader . onload = ( e ) => {
160160 const image = e . target ?. result as string ;
161- if ( image && image . length < MAX_IMAGE_SIZE ) {
161+ if ( image && image . length < MAX_URL_SIZE ) {
162162 view . dispatch ( {
163163 changes : {
164164 from : view . state . selection . main . from ,
You can’t perform that action at this time.
0 commit comments