Fixes Bold/Italics Issue (#8613)

Co-authored-by: Alex van Andel <me@alexvanandel.com>
pull/8741/head^2
Zoheb Ahmed 2023-05-08 17:41:25 +05:30 committed by GitHub
parent 3c46c39114
commit 2907405d4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -459,9 +459,6 @@ export default function ToolbarPlugin(props: TextEditorProps) {
StartIcon={Bold} StartIcon={Bold}
onClick={() => { onClick={() => {
editor.dispatchCommand(FORMAT_TEXT_COMMAND, "bold"); editor.dispatchCommand(FORMAT_TEXT_COMMAND, "bold");
if (isItalic) {
editor.dispatchCommand(FORMAT_TEXT_COMMAND, "italic");
}
}} }}
className={isBold ? "bg-subtle" : ""} className={isBold ? "bg-subtle" : ""}
/> />
@ -474,9 +471,6 @@ export default function ToolbarPlugin(props: TextEditorProps) {
StartIcon={Italic} StartIcon={Italic}
onClick={() => { onClick={() => {
editor.dispatchCommand(FORMAT_TEXT_COMMAND, "italic"); editor.dispatchCommand(FORMAT_TEXT_COMMAND, "italic");
if (isItalic) {
editor.dispatchCommand(FORMAT_TEXT_COMMAND, "bold");
}
}} }}
className={isItalic ? "bg-subtle" : ""} className={isItalic ? "bg-subtle" : ""}
/> />