mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
13 lines
342 B
TypeScript
13 lines
342 B
TypeScript
|
import { Editor } from "@tiptap/core"
|
||
|
|
||
|
export const copyMarkdownToClipboard = (editor: Editor | null) => {
|
||
|
const markdownOutput = editor?.storage.markdown.getMarkdown();
|
||
|
navigator.clipboard.writeText(markdownOutput)
|
||
|
}
|
||
|
|
||
|
export const CopyPageLink = () => {
|
||
|
if (window){
|
||
|
navigator.clipboard.writeText(window.location.toString())
|
||
|
}
|
||
|
}
|