BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Property 'url' does not exist on type

Open zacharymichaelmoore opened this issue 2 years ago • 2 comments

Describe the bug In my own project I am trying to write a function which detects when a specific image block is removed, so that I can send a delete request to a storage bucket with the image to be removed urls. The url property is not being recognized. An image block should have this property but it's saying it doesn't exist on the type.

To Reproduce https://stackblitz.com/edit/github-3pkkxc?file=App.tsx

Screenshot 2024-10-10 at 11 11 42 AM Screenshot 2024-10-10 at 11 12 19 AM

Misc Maybe I am not understanding something but it looks like url property does exist.

zacharymichaelmoore avatar Oct 10 '24 17:10 zacharymichaelmoore

first assert that it's an image block:

obj.type === "image" && obj.props.url !== imageURLAtCursorPosition

YousefED avatar Oct 10 '24 17:10 YousefED

thanks

zacharymichaelmoore avatar Oct 10 '24 17:10 zacharymichaelmoore