Attempt to use tiptap for view, failing due to https://github.com/ueberdosis/tiptap/issues/5176

This commit is contained in:
Jon Staab
2024-09-24 10:56:42 -07:00
parent d7dba6c61a
commit 256a70d6fb
7 changed files with 41 additions and 34 deletions
+10 -6
View File
@@ -52,6 +52,8 @@ type EditorOptions = {
loading: Writable<boolean>
getPubkeyHints: (pubkey: string) => string[]
submitOnEnter?: boolean
content?: string
autofocus?: boolean
}
export const getModifiedHardBreakExtension = () =>
@@ -78,9 +80,11 @@ export const getEditorOptions = ({
loading,
getPubkeyHints,
submitOnEnter,
content = "",
autofocus = false,
}: EditorOptions) => ({
content: "",
autofocus: true,
content,
autofocus,
extensions: [
Code,
CodeBlock,
@@ -137,10 +141,10 @@ export const getEditorOptions = ({
},
}),
],
onTransaction() {
// @ts-ignore
console.log(this.getJSON())
}
// onTransaction() {
// // @ts-ignore
// console.log(this.getJSON())
// }
})
type ViewOptions = {