Skip to content

Simplify using images in component templates #58

Description

@mhaack

Currently using images in component templates is cumbersome, like:

"plugins": {
        "da": {
          "name": "carousel",
          "unsafeHTML": "<div><div><div><picture><source type=\"image/webp\" srcset=\"\"><source type=\"image/jpeg\" srcset=\"\"><img loading=\"lazy\"></picture></div><div></div></div>"
        }
      }

We should support a simple placeholder <picture> which is replaced by UE with the full picture tag. The configuration would look like:

"plugins": {
        "da": {
          "name": "carousel",
          "unsafeHTML": "<div><div><div><picture></div><div></div></div>"
        }
      }

The backend can detect the <picture> tag without any children or extra attributes and expand it with a default template. This way we can stay backward compatible easily.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    da-ueAuthorBus & Universal Editor related stuffenhancementNew feature or request

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions