Remove editor, use welshman editor again

This commit is contained in:
Jon Staab
2025-02-04 20:29:12 -08:00
parent fd99866b1e
commit 565ccb399a
18 changed files with 44 additions and 1016 deletions
+6 -6
View File
@@ -1,14 +1,14 @@
import type {NodeViewProps} from '@tiptap/core'
import type {NodeViewProps} from "@tiptap/core"
import {deriveProfileDisplay} from "@welshman/app"
export const MentionNodeView = ({node}: NodeViewProps) => {
const dom = document.createElement('span')
const dom = document.createElement("span")
const display = deriveProfileDisplay(node.attrs.pubkey)
dom.classList.add('tiptap-object')
dom.classList.add("tiptap-object")
const unsubDisplay = display.subscribe($display => {
dom.textContent = '@' + $display
dom.textContent = "@" + $display
})
return {
@@ -17,10 +17,10 @@ export const MentionNodeView = ({node}: NodeViewProps) => {
unsubDisplay()
},
selectNode() {
dom.classList.add('tiptap-active')
dom.classList.add("tiptap-active")
},
deselectNode() {
dom.classList.remove('tiptap-active')
dom.classList.remove("tiptap-active")
},
}
}