closes https://github.com/TryGhost/Team/issues/871
- when determining the size of the iframe containing a nested iframe in the embed card we were incorrectly treating a `100%` width attribute as a `100px` attribute and ending up with a completely incorrect ratio calculation
- added a conditional to ignore %-width attributes when calculating a ratio for a nested iframe
- if we have a nested iframe with a %-width but a fixed height, use that fixed height for the outer container iframe
refs https://github.com/TryGhost/Team/issues/1253
- Selecting the `image` style opens the file selector right away
- Avoids an extra click to the user
- Moved `GhFileInput` so that it's always rendered, which enables triggering it right when selecting the `image` style
refs https://github.com/TryGhost/Team/issues/1253
- added the card width back (only regular or full options)
- removed the accent class from the button
- fixed a bug happening when the subheader was empty
refs https://github.com/TryGhost/Team/issues/1249
We now want to update the element which we are observing, which means we
end up in a loop. Instead we can listen to resize events and manually
update the dimensions when images are changed.
refs https://github.com/TryGhost/Team/issues/1249
Based on the design wireframes we're not going to be using a floating
panel for settings, this moves the functionality into the toolbar
refs https://github.com/TryGhost/Team/issues/1249
This adds a WIP for the Before/After card UI - behind an alpha flag.
It's completely missing design input and is intented to serve as a base
to work from.
refs https://github.com/TryGhost/Team/issues/1230
- allowing users to delete the thumbnail and upload another is a better flow as it allows removing a thumbnail as well if not needed
refs https://github.com/TryGhost/Team/issues/1230
- Updated the audio and file card to follow - 1st click → select, 2nd click → edit pattern, which is consistent with other cards
refs https://github.com/TryGhost/Team/issues/1229
- changed the video card image so it uses an aspect-ratio box set to the aspect ratio of the video, with the image using `object-fit: cover` to match the background image behavior in the front-end
refs https://github.com/TryGhost/Team/issues/1229
- using the images API lets us separate the auto-generated thumbnail and custom thumbnail
- added `customThumbnailSrc` to video card payload and switched settings panel uploader to store upload result there
- switched image display to fallback from custom thumbnail to auto-generated thumbnail
refs https://github.com/TryGhost/Team/issues/1245
- When pressing backspace on an empty `KoenigBasicHtmlInput` that don't use `p` as the default tag, an empty paragraph was created by e21bde39e1/lib/koenig-editor/addon/options/key-commands.js (L171-L176), messing with the style while in edit mode.
- This was fixed by normalizing the tag to be the `defaultTag` in the `didUpdatePost` hook
- Because of this new normalization, we could remove the same normalization from `handlePaste`
refs https://github.com/TryGhost/Team/issues/1245
- Used onmouseover because a CSS-only approach wouldn't work
- CSS can only highligh next siblings on hover, while we want to highlight previous sibling in our case
- This adds a hover class on mouseover to the right stars and removes it onmouseout
refs https://github.com/TryGhost/Team/issues/1239
Repeatedly clicking the quote icon in the editor toolbar or using the <kbd>Ctrl+Q</kbd> keyboard shortcut will cycle through standard-blockquote -> alternative-blockquot -> standard paragraph.
refs https://github.com/TryGhost/Team/issues/1245
- Several inputs where dismissing the content when pasting HTML without the expected input tag
- The inputs where: the caption of the feature image; the email footer; the caption in the bookmark, code, embed, gallery, image, video cards; the callout card title; the product card header and description; the toggle header
- This makes sure the wrapper html tag is the expected one.
Co-authored-by:
- Kevin Ansfield (@kevinansfield)
closes https://github.com/TryGhost/Team/issues/1254
- when switching over to a more generic file paste handling the prevention of the default paste behaviour was missed meaning an additional image element was added to the contenteditable area which was not rendered on the front-end and disappeared when reloading the post
no issue
- pasted URLs that are converted into an embed card were triggering the `convertUrl` task twice, once on insertion and then again on the immediate deselection that happens whilst the caret is adjusted
- a change in browsers or in Twitter's script meant that the double-fetch and iframe population started to become unreliable with the script not triggering, or the iframe contents being replaced interfering with script timing, resulting in un-styled Twitter embeds immediately after pasting a URL
- added `.drop()` to the `convertUrl` task so the second deselection call is ignored whilst the first call is still in progress
refs https://github.com/TryGhost/Team/issues/1230
- when updating a thumbnail for audio card, the thumbnail url doesn't change as its tied to the audio src. this can cause the old thumbnail to show in frontend due to browser caching
- this change adds a cache busting param at the end of url for each thumbnail upload, thus bypassing cache and showing the right thumbnail