Conversation
Adds assetDeliveryType='link-img' image attr: edited/rendered as a real <img> but serialized by doc2aem as a plain <a href title data-asset-delivery-type="link-img"> link (alt carried in title, no <picture>). Round-trips back to an image node on load via a new higher-priority parseDOM rule. Fixes the Node-side selector matcher (matches()) to support compound/value attribute selectors, needed for the new rule to match under aem2doc's Node DOMParser path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Sep 15, 2026
…dit-as Replace the value-matching data-asset-delivery-type="link-img" selector with a presence-only marker: a[data-edit-as], read/written as a plain attribute value rather than baked into the parseDOM selector. Avoids extending matches() to support compound/value-equality selectors -- it only needs single-attribute presence checks, matching the existing img[src]/a[href] pattern. Renames the image node attr assetDeliveryType -> editAs (value link-img -> image) so the internal attr name and DOM attribute (data-edit-as="image") read as the same concept. Also stops manually bumping package.json version -- semantic-release handles that on merge based on commit type. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
shsteimer
added a commit
to adobe/da-live
that referenced
this pull request
Sep 15, 2026
…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>
shsteimer
added a commit
to adobe/da-collab
that referenced
this pull request
Sep 15, 2026
Revert @adobe/da-parser to ^2.1.0 -- no real published version exists yet for the link-img support (adobe/da-tools#27), and da-parser doesn't hand-bump its own version (semantic-release does that on merge). Bumping to ^2.2.0 is a required step before merging this PR, once that version is published. Update the round-trip test for da-parser's renamed marker: data-asset-delivery-type="link-img" -> data-edit-as="image". Verified passing against the (locally npm-linked) updated parser. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
imagenode attreditAs='image': edited as a real<img>, serialized bydoc2aemas a plain<a href title data-edit-as="image">link (alt → title, no<picture>).<a>: it's purely an authoring signal tellingaem2doc"load this link back as an image node" — the published page/decoration code never needs to look at it.a[data-edit-as]) round-trips that shape back to an image node.matches()inhtml-parser.js(Node-side selector matcher used byaem2doc) only needed a small fix: hyphenated attribute names in the existing single-bracket presence check (toHastPropName), not a rewrite to support compound/value-equality selectors — the marker is presence-only, so the actual value is read ingetAttrs, not compared in the selector.Part of the
link-imgfeature spanning da-parser → da-live → da-collab. da-live/da-collab PRs depend on this one publishing first.Test plan
npm run test:node— 132 passingnpm run test:browser— 146 passingnpm run lint— cleantoDOM/parseDOM foreditAs,doc2aemlink-img serialization (no<picture>), fullaem2doc→doc2aemround-trip, regression test for normal images🤖 Generated with Claude Code