REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 994 B
Close
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@tiptap/extension-link/src/helpers/clickHandler.ts
Text
Base64
import { getAttributes } from '@tiptap/core' import { MarkType } from '@tiptap/pm/model' import { Plugin, PluginKey } from '@tiptap/pm/state' type ClickHandlerOptions = { type: MarkType } export function clickHandler(options: ClickHandlerOptions): Plugin { return new Plugin({ key: new PluginKey('handleClickLink'), props: { handleClick: (view, pos, event) => { if (event.button !== 0) { return false } const eventTarget = event.target as HTMLElement if (eventTarget.nodeName !== 'A') { return false } const attrs = getAttributes(view.state, options.type.name) const link = (event.target as HTMLLinkElement) const href = link?.href ?? attrs.href const target = link?.target ?? attrs.target if (link && href) { if (view.editable) { window.open(href, target) } return true } return false }, }, }) }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
autolink.ts
4.00 KB
lrw-r--r--
2026-02-28 00:28:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
clickHandler.ts
994 B
lrw-r--r--
2026-02-28 00:28:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
pasteHandler.ts
1.21 KB
lrw-r--r--
2026-02-28 00:28:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).