mirror of
https://github.com/linsa-io/linsa.git
synced 2026-07-11 08:02:38 +02:00
Move to TanStack Start from Next.js (#184)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export * from "./reset-marks-on-enter"
|
||||
@@ -0,0 +1,25 @@
|
||||
import { Extension } from "@tiptap/core"
|
||||
|
||||
export const ResetMarksOnEnter = Extension.create({
|
||||
name: "resetMarksOnEnter",
|
||||
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
Enter: ({ editor }) => {
|
||||
if (
|
||||
editor.isActive("bold") ||
|
||||
editor.isActive("italic") ||
|
||||
editor.isActive("strike") ||
|
||||
editor.isActive("underline") ||
|
||||
editor.isActive("code")
|
||||
) {
|
||||
editor.commands.splitBlock({ keepMarks: false })
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
},
|
||||
}
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user