@@ -1459,10 +1488,10 @@ export default function TextEditor(props: TextEditorProps) {
.run()
}
class={`${
- instance().isActive("heading", { level: 2 })
+ isActive("heading", { level: 2 })
? "bg-surface2"
: "hover:bg-surface1"
- } rounded px-2 py-1`}
+ } touch-manipulation rounded px-2 py-1 select-none`}
>
H2
@@ -1476,10 +1505,10 @@ export default function TextEditor(props: TextEditorProps) {
.run()
}
class={`${
- instance().isActive("heading", { level: 3 })
+ isActive("heading", { level: 3 })
? "bg-surface2"
: "hover:bg-surface1"
- } rounded px-2 py-1`}
+ } touch-manipulation rounded px-2 py-1 select-none`}
>
H3
@@ -1489,10 +1518,8 @@ export default function TextEditor(props: TextEditorProps) {
instance().chain().focus().toggleBold().run()
}
class={`${
- instance().isActive("bold")
- ? "bg-crust"
- : "hover:bg-crust"
- } bg-opacity-30 hover:bg-opacity-30 rounded px-2 py-1`}
+ isActive("bold") && "bg-crust"
+ } bg-opacity-30 hover:bg-opacity-30 touch-manipulation rounded px-2 py-1 select-none`}
>
B
@@ -1502,10 +1529,8 @@ export default function TextEditor(props: TextEditorProps) {
instance().chain().focus().toggleItalic().run()
}
class={`${
- instance().isActive("italic")
- ? "bg-crust"
- : "hover:bg-crust"
- } bg-opacity-30 hover:bg-opacity-30 rounded px-2 py-1`}
+ isActive("italic") && "bg-crust"
+ } bg-opacity-30 hover:bg-opacity-30 touch-manipulation rounded px-2 py-1 select-none`}
>
I
@@ -1515,10 +1540,8 @@ export default function TextEditor(props: TextEditorProps) {
instance().chain().focus().toggleStrike().run()
}
class={`${
- instance().isActive("strike")
- ? "bg-crust"
- : "hover:bg-crust"
- } bg-opacity-30 hover:bg-opacity-30 rounded px-2 py-1`}
+ isActive("strike") && "bg-crust"
+ } bg-opacity-30 hover:bg-opacity-30 touch-manipulation rounded px-2 py-1 select-none`}
>
S
@@ -1526,36 +1549,19 @@ export default function TextEditor(props: TextEditorProps) {
type="button"
onClick={setLink}
class={`${
- instance().isActive("link")
- ? "bg-crust"
- : "hover:bg-crust"
- } bg-opacity-30 hover:bg-opacity-30 rounded px-2 py-1`}
+ isActive("link") && "bg-crust"
+ } bg-opacity-30 hover:bg-opacity-30 touch-manipulation rounded px-2 py-1 select-none`}
>
Link
-
-
-
{/* Table controls in bubble menu */}
-
+