mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 21:33:24 +03:00
516ad8297a
refs https://github.com/TryGhost/Team/issues/1225 Re-using the existing pattern of creating an image card and having it launch an image selector was proving to have a lot of edge cases when we wanted a more streamlined in-line image selector for gifs. - added a new `'selector'` type to card definitions - requires a `selectorComponent` argument that is the name of a component that renders the media and handles search - updated card components to open the selector component when respective menu item is activated - updated slash menu to instantly trigger the selector component when the slash command matches a card and is followed by a space so that searches continue inside the selector - added `<KoenigMediaSelector>` component that wraps the card-definition provided component and handles escape key, clicks outside of the editor, and provides a stripped down API to the child component for selecting/closing - added `<KoenigMediaSelectorTenor>` which mostly replicates the `<GhTenor>` component but has different styling and uses the provided media selector API |
||
---|---|---|
.. | ||
components | ||
helpers | ||
services |