You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Custom inline content not updating in the document #2142
Describe the bug
When inserting a simple custom inline content, updating the text in the editor is visible, but if you try to reteive the document from the editor the custom inline content is empty.
To Reproduce
Use the slash command to insert a tag, click the red tag, type some letters. Hit the export button, you'll see the JSON update and the content of the custom_tag type of content is alway empty
What am I doing wrong? The docs around editable custom inline content is really thin. Took a while to work out I needed a ref pointing to the content ref on an element for the content to be shown ref={props.contentRef}. But cannot for the life of me figure out how to make these editable and exportable
It's curious that if you edit an initialContent tag it will update the document with the content, but if you insert a new one, it won't grab the content from the new inline content.
Misc
Node version:
Package manager:
Browser:
I'm a sponsor and would appreciate if you could look into this sooner than later 💖
It's curious that if you edit an initialContent tag it will update the document with the content, but if you insert a new one, it won't grab the content from the new inline content.
So try inserting a new tag from the slash menu (it's right at the bottom), and then edit the content and try export. You'll see the content array remain empty even if it has content displayed in the editor
Do you guys happen to be using the ProseMirror devtools by any chance?
~~I've found that when the devtools are disabled, it works & when they are enabled, it breaks like it does for you both @SiTaggart & @edwardbrowncross ~~
OK, after much debugging, I've figured out that this is mostly a CSS issue. There is some work that we can do to make this experience better. It seems that we do not have any examples of editable inline content, which would explain why we did not catch this earlier.
I'm can't justify spending more time on this right now. So, I'm leaving my diff here so that I or @matthewlipski can get back to this later:
Hello, I am facing exactly the same issue, where customInlineContent not showing when passed as initialContent, before any version update is done to the blockNote, could you kindly provide a temp fix solution on the app level for this? Thanks a lot :)
Sorry @clyce we have other things that we are working towards at the moment, so we don't have the capacity to look into this further (at least) until after the end of the year.
If you would like to look into this, feel free to do so, I'm happy to answer any questions you have. It'd be great to have this resolved & have a PR that we can help fix this for others!
Activity
YousefED commentedon Oct 31, 2025
Hi Simon,
Thanks for the feedback (we'll have a fresh look at the docs) and stackblitz. For me, it works straight out-of-the-box when I try the stackblitz;
Are you sure you're still having the issue?
SiTaggart commentedon Oct 31, 2025
Yeah, like I mentioned in the issue:
So try inserting a new tag from the slash menu (it's right at the bottom), and then edit the content and try export. You'll see the content array remain empty even if it has content displayed in the editor
edwardbrowncross commentedon Nov 6, 2025
Just to add a few more observations:
onItemClick: () => editor.insertInlineContent([ { type: 'custom_tag', + content: [ + { + type: 'text', + text: 'content from slash menu', + styles: {}, + }, + ], }, ]),Then:
inlineContentprop)So it really looks like the component you give to the ref isn't being wired up to the internal state in either direction.
editor.replaceBlockshas the same behaviour, so it is not just slash menu orinsertInlineContentnperez0111 commentedon Nov 6, 2025
Do you guys happen to be using the ProseMirror devtools by any chance?~~I've found that when the devtools are disabled, it works & when they are enabled, it breaks like it does for you both @SiTaggart & @edwardbrowncross ~~
~~I think this may just be related to: TeemuKoivisto/prosemirror-dev-toolkit#84 ~~
Oh actually maybe not, it works for existing inline content, but not for newly created ones.
nperez0111 commentedon Nov 6, 2025
OK, after much debugging, I've figured out that this is mostly a CSS issue. There is some work that we can do to make this experience better. It seems that we do not have any examples of editable inline content, which would explain why we did not catch this earlier.
I'm can't justify spending more time on this right now. So, I'm leaving my diff here so that I or @matthewlipski can get back to this later:
clyce commentedon Dec 19, 2025
Hello, I am facing exactly the same issue, where
customInlineContentnot showing when passed asinitialContent, before any version update is done to the blockNote, could you kindly provide a temp fix solution on the app level for this? Thanks a lot :)nperez0111 commentedon Dec 19, 2025
Sorry @clyce we have other things that we are working towards at the moment, so we don't have the capacity to look into this further (at least) until after the end of the year.
If you would like to look into this, feel free to do so, I'm happy to answer any questions you have. It'd be great to have this resolved & have a PR that we can help fix this for others!
nperez0111 commentedon Oct 24, 2026
#3251 should have fixed this issue