Closed semanticist21 closed 5 months ago
@semanticist21 I want to reproduce the bug you found but the codesandbox link is "Devbox not found".
Also, I'm not familiar with the expected behaviour here, but based on the title and the expected behaviour you described:
Image resize by dragging is not possible.
Do you expect the resize by dragging to work or not to work, when inline: true option is present?
@semanticist21 I want to reproduce the bug you found but the codesandbox link is "Devbox not found".
Also, I'm not familiar with the expected behaviour here, but based on the title and the expected behaviour you described:
Image resize by dragging is not possible.
Do you expect the resize by dragging to work or not to work, when inline: true option is present?
Sorry. It is other link. https://codesandbox.io/p/sandbox/mui-tiptap-demo-3zl2l6
you can reproduce the issue by giving option { inline: true } to ResizableImage extension. I want to resize dragging work normally(enabled to drag) even when "inline" is true.
And actually, I found what the problem is. When inline option is true, "selected" boolean works differntly.
ResizableImageResizer in ResizableImageComponent.tsx is hidden even with normal dragging behaviour, "selected" turns false whenver I start to drag the image. It happenes when only inline option is true.
I had to create my own custom selected boolean to work properly. I am not sure exactly why this is happening.
Glad you found the bug, I'd would take me much longer considering I haven't had a chance to dive in all the details. I'm curious will you consider creating a new release version including the fix above, as well as some of the PRs?
It is a temporay solution but If that is ok, I can PR after some tests by myself!
Firstly, great thanks for contributors. I'm using the editor with example here codesandbox.
"https://codesandbox.io/p/devbox/mui-tiptap-demo-forked-g6njhk?file=%2Fsrc%2FEditorMenuControls.tsx&workspaceId=383814f0-5631-4226-8011-65cb927d4daf"
Describe the bug
I had to edit ResizableImage extension options in "useExtensions.ts" to enable image paste when writing. I don't know why but when directly copying content from page, image was not copy-pasted into the editor.
After I enabled options, resizing feature by dragging is not working properly.
To Reproduce
https://codesandbox.io/p/devbox/mui-tiptap-demo-forked-g6njhk?file=%2Fsrc%2FuseExtensions.ts%3A166%2C15-166%2C20&workspaceId=383814f0-5631-4226-8011-65cb927d4daf
enable inline true.
Expected behavior
Image resize by dragging is not possible.
Screenshots
System (please complete the following information)
extensions
array used for the editor: