MCPcopy Create free account
hub / github.com/027xiguapi/code-box / handleSetPost

Function handleSetPost

utils/editMarkdownHook.ts:16–24  ·  view source on GitHub ↗
(selectorDom, articleTitle)

Source from the content-addressed store, hash-verified

14 })
15
16 const handleSetPost = (selectorDom, articleTitle) => {
17 const content = turndownService.turndown(selectorDom)
18 const post = {
19 content: content,
20 title: articleTitle
21 }
22 setPost(JSON.stringify(post))
23 window.open("https://md.code-box.fun", "_blank")
24 }
25
26 return [post, handleSetPost]
27}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected