no issue
- we had some code in `<KoenigEditor>` that was automatically saving a card when exiting edit mode based on some flawed logic, this meant we were making multiple editor updates simultaneously resulting in usage+change of the upstream `post` model within the same render loop (add paragraph code deselected the card, starts adding new paragraph, the deselection triggered the exit-edit mode which then caused a simultaneous post update)
- passed card env through to `<KoenigEditor>` so that it can compare current payload state against the "saved" payload state to determine if it should save when leaving edit mode
- renamed `_textReplacementEditor` to `_calloutTextEditor` to better match it's usage
- removed unnecessary `onNewline` handling, it wasn't being called because we overrode `ENTER` key
no issue
- switching to `<KoenigBasicHtmlInput>` means that the payload is no longer wrapped in `<p>` tags because the callout should not be a multi-paragraph input
refs https://github.com/TryGhost/Team/issues/1206
- The KoenigBasicHtmlTextarea wasn't an option as the `Enter` key was binded to a line return. And we want to use the `Enter` key to switch to the next paragraph outside of the callout card.
no issue
- text-replacement-input text expansions were customised to not use backticks for code and to have special format handling for `{}`
- switched to it's own set of text expansions that cover the standard expansions used in the main editor except for headings and card replacements
no issue
- the component was still using the text-replacement component's key commands which didn't include code formatting because code in text-replacement component is re-purposed for replacement string highlights
refs https://github.com/TryGhost/Team/issues/1206
- Store the latest emoji locally in the component
- Create a defaultEmoji method to ease retrieving the right emoji
- Use the default emoji when toggling the emoji back on in the card
- Still use 💡 as the default callout emoji
refs https://github.com/TryGhost/Team/issues/1206
- Because we allow <br> in the editor, the editor placeholder was remaining when editing (<p><br></p>). This clean the editor placeholder.
refs https://github.com/TryGhost/Team/issues/1211
- the outline and snippet availability were toggled on `payload.html` presence which isn't set for nft embeds. Switched to toggling on `payload.type` instead as per the main rendered/blank slate conditional
refs https://github.com/TryGhost/Team/issues/1211
Using `type` rather than `card_type` since that's been replaced in the
API.
Moves the rendering of the card in the template so that we get
access to the caption editor, and selectable card (rather than the
anchor tag redirecting us to OpenSea)
Updates the `isEmpty` property to take into account NFT cards.
refs https://github.com/TryGhost/Team/issues/1217
- tenor API config is now an object that lives at `config.tenor`
- updated gifs card gating to use the new config object
- added passthrough of `contentfilter` param from config when making Tenor API requests
refs https://github.com/TryGhost/Team/issues/1206
- Re-use the saved emoji as the default for future callout cards
- Introduced a localstorage util that ignores errors. Ignoring errors avoids issues with browsers that don't support localstorage
refs https://github.com/TryGhost/Team/issues/1206
- This only solves partially the line-returns being eaten by the editor. When editing a card with a line return, it will be removed.
refs https://github.com/TryGhost/Team/issues/1220
- added array support to `{{card-is-available}}` helper where every key needs to be present for the card to be available
- changed gifs card `isAvailable` property to require both the feature flag and the tenor api key to be set in config
no issue
- `{{action}}` is deprecated and is only available for backwards compatibility with action hashes in non-Glimmer components
- for event handlers we should be using the `{{on}}` modifier to use `addEventListener` on an element rather than directly attaching JS functions using `onclick=` attributes to avoid subtle DOM event ordering bugs
refs https://github.com/TryGhost/Team/issues/1206
- prevents text in curly brakets from being wrapped into a <code> tag
- updated the callout card to this generic textarea editor instead of the email-specific editor
no issue
- the number of properties that cards have in their definition was growing so it made sense to drop the single-use `feature` property in favor of the `isAvailable` property that can perform the same functionality
closes https://github.com/TryGhost/Team/issues/1223
It's possible to disable the Unsplash integration from the integration settings but when disabled the image selector was still available for post feature images and as an editor embed option.
- adds `isAvailable` property to card definitions, if it's set it should be a string that matches a config/setting that determines the card's availability
- unsplash card updated to use `'settings.unsplash'` as it's `isAvailable` property
- adds conditional to `<GhEditorFeatureImage>` so the Unsplash selector is only shown when enabled to bring it inline with the `<GhImageUploader>` component that was used previously for post feature images
refs https://github.com/TryGhost/Team/issues/1211
Since we have switched to rendering the NFT card outside of the OEmbed
response we no longer include a html property. This check would throw
for missing HTML so we've updated it to not include NFT cards