Open simon-lund opened 8 months ago
Hi @simon-lund !
I think the ideal implementation of this would not rely on InlineContent. Imo, the suggested text should not really be added to the document, but it should only show up in the UX. For this, I think the right implementation would be a combination of Prosemirror decorations and CSS styles. That makes it a bit more low-level at this moment unfortunately
We'll probably look into it in the future, but you're welcome to give it a go as well of course
Hello @YousefED,
It would be really helpful if BlockNote has in-built "Tab-Accept Feature". I am facing issues while implementing it ourselves.
I'd really like to see this too!
Hi it would be good to use a / command to do this as like notion ai the user can choose if they like out put
I would like to implment a feature similar to Github Copilot for text editing. That is, the AI can make text suggestions at the current cursor position, which can then be added via press on "Tab".
I have looked through the docs and I could do this with
insertInlineContent
and use "gray" as text color. This, however, inserts the text into the block immediately. So, if the user doesn't want it there, I wold have to remove the text somehow.Instead it would be nice to have a
insertDiscardableContent
function, which displays text at the current text but does not add it to the block right away. It could have a callback function, where the develeoper can implement listeners and what not.This could look something like this (Written with GPT):
Originally posted by @simon-lund in https://github.com/TypeCellOS/BlockNote/issues/122#issuecomment-1999572089