Southclaws / storyden

With a fresh new take on traditional bulletin board forum software, Storyden is a modern, secure and extensible platform for building communities.
https://www.storyden.org/
Mozilla Public License 2.0
93 stars 11 forks source link

Link preview in composer #237

Open Southclaws opened 1 month ago

Southclaws commented 1 month ago

This is something the old Slate.js editor had, but with Tiptap it looks like it's going to be a lot more complicated...

Essentially, when a link is dropped into a composer, the Link extension/plugin should make a call to POST /links { url: ... } using import { linkCreate } from "@/api/openapi-client/links"; and on its successful response, render a NodeViewWrapper with some kind of rich card preview (either a <CardBox> with the title/description/image or a <RichCard> with the correct props set)

The existing Tiptap link extension is pretty large but that might be the only way, copy that into SD and extend it with a addNodeView... needs some discovery work.