3 ms·
Hello Hacker News! Maker of Novel.sh here! First of all, apologies for the typo lol, apparently I can't spell "WYSIWYG" :') Some context: I've always been a h
by steventey 3y ago
Hello Hacker News! Maker of Novel.sh here!
First of all, apologies for the typo lol, apparently I can't spell "WYSIWYG" :')
Some context: I've always been a huge fan of Notion's editor, and since Vercel launched the AI SDK yesterday (https://sdk.vercel.ai/docs https://sdk.vercel.ai/docs), I decided to take this as an opportunity to recreate Notion's block editor + incorporate some of Notion's latest AI features with `npm i ai`
Here's basically how it works:
1. Tiptap Editor setup with custom slash command extension
2. `useCompletion` hook at the parent editor + the slash command menu – using `id` to share states
3. `/api/generate` route to stream responses from OpenAI
Novel also handles image uploads via drag & drop / copy & paste. Images are stored as base64 strings in localStorage currently, but I'm planning to implement uploads to Vercel Blob in the future.
The code is fully open-source – feel free to check it out: http://novel.sh/github http://novel.sh/github
Hope y'all like this – let me know if you have any feedback!
- idk1 3y agoIt's ironic that after posting a text editor you can't edit the text in your title.