mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 00:06:09 +08:00
feat: Double-link: In-line cursor handling, e.g., up, down, left,right, backspace keys
This commit is contained in:
@@ -26,15 +26,20 @@ export const DoubleLinkComponent = (props: RenderElementProps) => {
|
||||
[doubleLinkElement, navigate]
|
||||
);
|
||||
|
||||
const displayValue = doubleLinkElement.children
|
||||
.map((item: any) => item.text)
|
||||
.join('');
|
||||
|
||||
return (
|
||||
<span>
|
||||
<PagesIcon style={{ verticalAlign: 'middle', height: '20px' }} />
|
||||
<a
|
||||
{...attributes}
|
||||
style={{ cursor: 'pointer' }}
|
||||
href={`/${doubleLinkElement.workspaceId}/${doubleLinkElement.blockId}`}
|
||||
>
|
||||
<span onClick={handleClickLinkText}>{children}</span>
|
||||
<span onClick={handleClickLinkText}>
|
||||
<a {...attributes} style={{ cursor: 'pointer' }}>
|
||||
<PagesIcon
|
||||
style={{ verticalAlign: 'middle', height: '20px' }}
|
||||
/>
|
||||
<span>
|
||||
{children}
|
||||
{displayValue}
|
||||
</span>
|
||||
</a>
|
||||
</span>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user