Conversation
Adds aem.assets.image.type=link-img: pick an AEM asset and it's edited as a real image, but persists/publishes as a plain <a> link (project decoration handles it), round-tripping back to an image on reload. Alt is carried in the link title. Existing aem.assets.image.type=link (plain-text-link) behavior is unchanged. - config.js: derive insertAsLinkImg alongside insertAsLink - insert.js: pass assetDeliveryType through to the image node - da-assets.js: wire link-img through both the standard and smart-crop insertion paths - imageFocalPoint.js: skip focal-point cropping for link-img images - prose2aem.js: live preview renders link-img images as the same <a> shape doc2aem persists - bump @adobe/da-parser to 2.2.0 (adobe/da-tools#27) and rebuild deps/da-parser/dist/index.js Depends on adobe/da-tools#27 merging + publishing first (currently linked locally via npm link for dev). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
|
…r bump Rename to match da-parser's presence-only data-edit-as marker (adobe/da-tools#27): assetDeliveryType -> editAs, value link-img -> image. Revert the manual @adobe/da-parser version bump and rebuilt deps/da-parser/dist/index.js -- da-parser doesn't hand-bump its own version (semantic-release does that on merge), so there's no real version to point at yet. Required before merging this PR: bump @adobe/da-parser to the version published from adobe/da-tools#27 and rerun npm run build:da-parser. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rename the config value from link-img to editable-link (insertAsLinkImg -> insertAsEditableLink) for clarity now that the underlying node/DOM naming is editAs/data-edit-as. Also collapse the standard-insertion branch to a single else, reusing the already-computed editAs value instead of re-deriving it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
For
Is my understanding that the image will show in the author UI, however for the frontend markdown portion, we are working with the |
|
@besimhu correct. this only changes the authoring UX. it has no impact on how front end code/developers would handle the images selected from dynamic media. |
…mageType
Single imageType field ('link' | 'editable-link' | null) replaces two
boolean flags; unrecognized aem.assets.image.type values normalize to
null (falls back to normal image insertion).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…vert before merge) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ExternalImages flag Keep aem.assets.image.type=link on the data sheet; set aem.assets.editableExternalImages=true on the flags sheet to insert images as editable <img> nodes that are still delivered as links. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Editable link-images persist as <a href=src>, so an image link (href attr) was silently dropped on save and in preview. Hide Create/Edit link in canvas, disable the classic link menu item, and guard Mod-k in both editors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…itAs A dropped file is uploaded DA media, so the replaced image no longer keeps editAs (which saved it as a text link). Use the iframe's imageIndex, checked against the doc src captured at drop time, to replace only the dropped image; fall back to src matching when absent or drifted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
flagssheet flagaem.assets.editableExternalImages = true, which takes effect together with the existing data-sheetaem.assets.image.type = link. With both set, picking an AEM image inserts a real, editable<img>in the doc. Preview and live get a plain<p><a href title data-edit-as="image">link, the same way a normally authored link is saved. On reload the link comes back as an image. Alt text is carried in the linktitle.aem.assets.image.type = linkwithout the flag behaves as before (plain link). The flag has no effect unlessimage.typeislink.prose2aem.js) renders the same<p><a>shape thatdoc2aemsaves.editAs='image'(DOMdata-edit-as="image") matches da-parser's presence-only marker (feat(da-parser): add link-img asset delivery type for image nodes da-tools#27).Depends on adobe/da-tools#27 being merged and published, and on da-collab picking up that parser release.
Demo / testing on the branch
Branch preview, pointed at a locally running da-collab that uses the #27 parser:
https://linkimg--da-live--adobe.aem.live/canvas?da-collab=local#/path
Local setup (temporary, for demos only):
da-toolsonlinkimg, thennpm linkinda-parser.da-collabonlinkimguses the linked parser (npm link @adobe/da-parser).da-collab,src/shareddoc.jsgetBackend().fetchis temporarily changed to calladmin.da.liveover the internet instead of theda-admin-localbinding. Uncommitted, local only.npm run devinda-collab(servesws://localhost:4711). Use Chrome; Safari blocksws://localhostfrom an https page.aem.assets.image.type = link, flags sheetaem.assets.editableExternalImages = true.?da-collab=resetswitches back to prod collab.Documents still go through prod da-admin, so use a throwaway page and don't open it in regular da.live at the same time. Prod collab still has the old parser and would remove the marker.
268b4f9band28de66b5(deps/da-parser/dist/index.jsbuilt from the unpublished Directly uploading an image creates two entries in undo history. #27 branch)@adobe/da-parserinpackage.jsonto the version published from feat(da-parser): add link-img asset delivery type for image nodes da-tools#27npm run build:da-parserand commit the real bundle?da-collaboverride)Test plan
link/non-image regressions)prose2aemtests (link serialization keeps<p>, other images unaffected)