pattern-directory icon indicating copy to clipboard operation
pattern-directory copied to clipboard

Patterns: Remove `id`s from the copied pattern code

Open ryelle opened this issue 7 months ago • 0 comments

See https://github.com/WordPress/gutenberg/issues/60323 — Patterns created outside of the pattern creator have "local" images, with id values matching that other site. When they're used in the pattern directory and then copied, the ID attribute tells the editor that it's not an external image, so you don't get the "upload image" button, even though it's not an image on the destination site.

Can the id attribute be filtered out on copy so that this doesn't happen?

Related: https://github.com/WordPress/pattern-directory/issues/494

ryelle avatar Jul 04 '24 16:07 ryelle