0
Fork 0
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:
Steve Larson 2023-11-02 14:45:49 -05:00 committed by GitHub
parent 85fca5891f
commit 1c710e2410
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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>
);