diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index f11698cc..61195a81 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -232,5 +232,6 @@ "zine": "zine", "By time": "By time", "New only": "New only", - "Short opening": "Short opening" + "Short opening": "Short opening", + "Write an article": "Write an article" } diff --git a/public/locales/ru/translation.json b/public/locales/ru/translation.json index 0e970e6f..08edce51 100644 --- a/public/locales/ru/translation.json +++ b/public/locales/ru/translation.json @@ -250,5 +250,6 @@ "zine": "журнал", "By time": "По порядку", "New only": "Только новые", - "Short opening": "Небольшое вступление, чтобы заинтересовать читателя" + "Short opening": "Небольшое вступление, чтобы заинтересовать читателя", + "Write an article": "Написать статью" } diff --git a/src/components/Editor/EditorBubbleMenu.tsx b/src/components/Editor/EditorBubbleMenu.tsx index 043f8aac..ea57c637 100644 --- a/src/components/Editor/EditorBubbleMenu.tsx +++ b/src/components/Editor/EditorBubbleMenu.tsx @@ -2,6 +2,7 @@ import type { Editor } from '@tiptap/core' import styles from './EditorBubbleMenu.module.scss' import { Icon } from '../_shared/Icon' import { clsx } from 'clsx' +import { createEditorTransaction } from 'solid-tiptap' type BubbleMenuProps = { editor: Editor @@ -9,12 +10,25 @@ type BubbleMenuProps = { } export const EditorBubbleMenu = (props: BubbleMenuProps) => { + const isBold = createEditorTransaction( + () => props.editor, + (editor) => editor && editor.isActive('bold') + ) + return (