MCPcopy Create free account
hub / github.com/editablejs/editable / renderImage

Function renderImage

packages/plugins/image/src/components/image.tsx:171–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169 }
170
171 const renderImage = () => {
172 if (isError || !src || !loaded) return null
173
174 const atts = {
175 [DATA_IMAGE_KEY]: Editable.findKey(editor, element).id,
176 }
177 return (
178 <img
179 {...atts}
180 alt=""
181 draggable={false}
182 css={[
183 tw`inline-block align-baseline rounded w-full h-full`,
184 isUploading && tw`opacity-30`,
185 ]}
186 src={rotatedUrl || src}
187 />
188 )
189 }
190
191 const handleResizeChange = (width: number, height: number) => {
192 Transforms.setNodes<Image>(

Callers 1

image.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…