mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-18 18:38:05 +08:00
Migrated the import shortcut used in Svelte from @ to @graphite for better future package compatibility Co-authored-by: Andre Roelofs <andreroelofsai@gmail.com> Co-authored-by: Keavon Chambers <keavon@keavon.com>
10 lines
385 B
TypeScript
10 lines
385 B
TypeScript
import { type Editor } from "@graphite/wasm-communication/editor";
|
|
import { TriggerVisitLink } from "@graphite/wasm-communication/messages";
|
|
|
|
export function createHyperlinkManager(editor: Editor): void {
|
|
// Subscribe to process backend event
|
|
editor.subscriptions.subscribeJsMessage(TriggerVisitLink, async (triggerOpenLink) => {
|
|
window.open(triggerOpenLink.url, "_blank");
|
|
});
|
|
}
|