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.
refs https://github.com/TryGhost/Team/issues/1211
This adds handling for the data=payload attriute on Ghost NFT cards as
ell as parsing for the default OpenSea Embed and the Substack NFT 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
no issue
- fixed typo in the install-theme modal that meant we weren't correctly identifying Casper as the default theme meaning an attempt to install it was made instead of activating it
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/1121
Double-clicking the delete button in the confirmation modal could trigger a second attempt to delete the post/page when it had already been deleted resulting in an ugly/incomprehensible error bubbling up.
- added `{drop:true}` to the task instance so it can't be called again whilst it's currently running
- added a guard for `isDeleted` so we don't attempt to destroy an already deleted record
- added a `true` return so the button indicates a successful state rather than an error state whilst the modal is closing
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
- Replaced background and swatch colors to semi-transparent so that it works with light and dark mode
- Updated emoji-picker dark mode
- Removed text contrast adjustment for accent background
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