TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.
https://www.blocknotejs.org/
Mozilla Public License 2.0
5.91k stars 386 forks source link

Refactor/file blocks resolve url #760

Closed YousefED closed 1 month ago

YousefED commented 1 month ago

This PR makes it possible to register a resolveFileUrl function that resolves custom urls (with user defined schemas) to a browser-accessible url.

This makes it possible for example to return s3://bucket/name from uploadFile which is stored in the block, and resolve this s3 identifier to an "accessible" (in this case, signed url) on use (i.e.: when rendering a block)

[x] The main TODO in this PR is that all usage of props.url needs to be checked and piped through resolveUrl [x] There are also some TODOs in the code

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview May 24, 2024 0:15am
blocknote-website ✅ Ready (Inspect) Visit Preview May 24, 2024 0:15am