🤌 Rich text editor with real-time collaboration (Tiptap)

@rico.trevisan
thanks again for your work!
just something that I am not sure whether it is a bug or not. when I upload an image and then resize it to make it smaller, when I refresh the page the new smaller size is not saved but the old size is still in place. not sure whether this is something related to how tiptap works or the plugin itself. thanks

Thanks.

I’ll take a look!

v4.6.1

Bug Fix — Image resize not persisting

Fixed a bug where resizing an image would not persist after page refresh. The resized image would revert to its original size when the page was reloaded.

Root cause: The tiptap-extension-resizable extension was directly mutating the ProseMirror node’s attrs.width property instead of dispatching a proper transaction. ProseMirror uses immutable data structures, so direct mutations are not recorded in the document state and editor.getHTML() would not include the resized width.

Fix: The extension now uses editor.chain().updateAttributes('image', { width }) on mouseup to properly persist the width change via a ProseMirror transaction.

1 Like