editor-fullmenu-fix
All checks were successful
deploy / testbuild (push) Successful in 2m15s
deploy / Update templates on Mailgun (push) Has been skipped

This commit is contained in:
Untone 2024-10-11 21:43:17 +03:00
parent ffe0ede835
commit 10ef9e1828
2 changed files with 5 additions and 5 deletions

View File

@ -153,7 +153,7 @@ export const EditorComponent = (props: Props) => {
html && props.onChange(html) html && props.onChange(html)
const wordCount: number = e.storage.characterCount.words() const wordCount: number = e.storage.characterCount.words()
const charsCount: number = e.storage.characterCount.characters() const charsCount: number = e.storage.characterCount.characters()
wordCount && countWords({ words: wordCount, characters: charsCount }) charsCount && countWords({ words: wordCount, characters: charsCount })
} }
} }
})) }))

View File

@ -45,9 +45,9 @@ export const FullBubbleMenu = (props: FullBubbleMenuProps) => {
const isHighlight = isActive('highlight') const isHighlight = isActive('highlight')
// toggle open / close on submenus // toggle open / close on submenus
createEffect(on(props.shouldShow, setFootnoteEditorOpen)) createEffect(on(props.shouldShow, (x) => !x && setFootnoteEditorOpen(false)))
createEffect(on(props.shouldShow, setTextSizeBubbleOpen)) createEffect(on(props.shouldShow, (x) => !x && setTextSizeBubbleOpen(false)))
createEffect(on(props.shouldShow, setListBubbleOpen)) createEffect(on(props.shouldShow, (x) => !x && setListBubbleOpen(false)))
const toggleTextSizeMenu = () => setTextSizeBubbleOpen((x) => !x) const toggleTextSizeMenu = () => setTextSizeBubbleOpen((x) => !x)
const toggleListMenu = () => setListBubbleOpen((x) => !x) const toggleListMenu = () => setListBubbleOpen((x) => !x)
const toggleFootnoteEditor = () => setFootnoteEditorOpen((x) => !x) const toggleFootnoteEditor = () => setFootnoteEditorOpen((x) => !x)