mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
✨ Enabled emoji picker in various admin-x fields (#18850)
closes TryGhost/Product#4097 - enabled in announcement bar - enabled in signup (portal) description - enabled in newsletter footer
This commit is contained in:
parent
85fca5891f
commit
1c710e2410
1 changed files with 5 additions and 2 deletions
|
@ -9,7 +9,8 @@ export interface HtmlEditorProps {
|
|||
onChange?: (html: string) => void
|
||||
onBlur?: () => void
|
||||
placeholder?: string
|
||||
nodes?: 'DEFAULT_NODES' | 'BASIC_NODES' | 'MINIMAL_NODES';
|
||||
nodes?: 'DEFAULT_NODES' | 'BASIC_NODES' | 'MINIMAL_NODES'
|
||||
emojiPicker?: boolean;
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
@ -57,7 +58,8 @@ const KoenigWrapper: React.FC<HtmlEditorProps & { editor: EditorResource }> = ({
|
|||
onChange,
|
||||
onBlur,
|
||||
placeholder,
|
||||
nodes
|
||||
nodes,
|
||||
emojiPicker = true
|
||||
}) => {
|
||||
const onError = useCallback((error: unknown) => {
|
||||
try {
|
||||
|
@ -139,6 +141,7 @@ const KoenigWrapper: React.FC<HtmlEditorProps & { editor: EditorResource }> = ({
|
|||
onFocus={handleFocus}
|
||||
>
|
||||
<koenig.HtmlOutputPlugin html={value} setHtml={handleSetHtml} />
|
||||
{emojiPicker ? <koenig.EmojiPickerPlugin /> : null}
|
||||
</koenig.KoenigComposableEditor>
|
||||
</koenig.KoenigComposer>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue