+

+ {uploadState && (
+
+
+ {uploadState.progress === undefined
+ ? `${uploadingImageLabel}…`
+ : translate(lexicalMessages.uploadingImageProgress, {
+ progress: Math.round(uploadState.progress * 100),
+ })}
+
+
+
+
+
+ )}
+ {isSelected && editor.isEditable() && !uploadState && (
+ <>
+
setResizing(true)}
+ onResizeEnd={(width, height) => {
+ editor.update(() => {
+ const node = $getNodeByKey(nodeKey)
+ if ($isLexicalMediaNode(node)) {
+ node.setWidthAndHeight(width, height)
+ }
+ })
+ setResizing(false)
+ }}
+ />
+ {!isResizing && (
+
+ {IMAGE_ALIGNMENT_OPTIONS.map((option) => (
+
+ ))}
+
+
+
+ )}
+ {!isResizing &&
+ (isEditingCaption ? (
+
+ ) : (
+