fix: image outline on load (#5230)
This commit is contained in:
parent
2c609670c8
commit
4a9e09a54a
1 changed files with 2 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ export const ImageResizer = ({ editor }: { editor: Editor }) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Moveable
|
<Moveable
|
||||||
target={document.querySelector(".ProseMirror-selectednode") as HTMLElement}
|
target={document.querySelector(".active-editor .ProseMirror-selectednode") as HTMLElement}
|
||||||
container={null}
|
container={null}
|
||||||
origin={false}
|
origin={false}
|
||||||
edge={false}
|
edge={false}
|
||||||
|
|
@ -39,7 +39,7 @@ export const ImageResizer = ({ editor }: { editor: Editor }) => {
|
||||||
resizable
|
resizable
|
||||||
throttleResize={0}
|
throttleResize={0}
|
||||||
onResizeStart={() => {
|
onResizeStart={() => {
|
||||||
const imageInfo = document.querySelector(".ProseMirror-selectednode") as HTMLImageElement;
|
const imageInfo = document.querySelector(".active-editor .ProseMirror-selectednode") as HTMLImageElement;
|
||||||
if (imageInfo) {
|
if (imageInfo) {
|
||||||
const originalWidth = Number(imageInfo.width);
|
const originalWidth = Number(imageInfo.width);
|
||||||
const originalHeight = Number(imageInfo.height);
|
const originalHeight = Number(imageInfo.height);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue