Download frontend/src/io-managers/hyperlinks.ts from openfree/graphite2: direct link, hf CLI and curl.
- Browser
- Download file 341 Bytes
-
https://huggingface.co/spaces/openfree/graphite2/resolve/main/frontend/src/io-managers/hyperlinks.ts
- Command line
-
hf download hf://spaces/openfree/graphite2/frontend/src/io-managers/hyperlinks.ts
-
curl -L -o hyperlinks.ts https://huggingface.co/spaces/openfree/graphite2/resolve/main/frontend/src/io-managers/hyperlinks.ts
341 Bytes
| import { type Editor } from "@graphite/editor"; | |
| import { TriggerVisitLink } from "@graphite/messages"; | |
| export function createHyperlinkManager(editor: Editor) { | |
| // Subscribe to process backend event | |
| editor.subscriptions.subscribeJsMessage(TriggerVisitLink, async (triggerOpenLink) => { | |
| window.open(triggerOpenLink.url, "_blank"); | |
| }); | |
| } | |