Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ and this project adheres to
- 🐛(frontend) fix overlapping placeholders in multi-column layout #1455
- 🐛(backend) filter invitation with case insensitive email
- 🐛(frontend) reduce no access image size from 450 to 300 #1463
- 🐛(frontend) preserve interlink style on drag-and-drop in editor #1460

## [3.7.0] - 2025-09-12

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ test.describe('Doc Editor', () => {
// Wait for the interlink to be created and rendered
const editor = page.locator('.ProseMirror.bn-editor');

const interlink = editor.getByRole('link', {
const interlink = editor.getByRole('button', {
name: docChild2,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ test.describe('Doc Export', () => {

// Search the interlinking link in the editor (not in the document tree)
const editor = page.locator('.ProseMirror.bn-editor');
const interlink = editor.getByRole('link', {
const interlink = editor.getByRole('button', {
name: randomDoc,
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* eslint-disable react-hooks/rules-of-hooks */
import { createReactInlineContentSpec } from '@blocknote/react';
import { useRouter } from 'next/router';
import { useEffect } from 'react';
import { css } from 'styled-components';

import { StyledLink, Text } from '@/components';
import { BoxButton, Text } from '@/components';
import { useCunninghamTheme } from '@/cunningham';
import SelectedPageIcon from '@/docs/doc-editor/assets/doc-selected.svg';
import { useDoc } from '@/docs/doc-management';
Expand Down Expand Up @@ -51,10 +52,16 @@ interface LinkSelectedProps {
}
const LinkSelected = ({ url, title }: LinkSelectedProps) => {
const { colorsTokens } = useCunninghamTheme();
const router = useRouter();

const handleClick = (e: React.MouseEvent<HTMLDivElement>) => {
e.preventDefault();
router.push(url);
};

return (
<StyledLink
href={url}
<BoxButton
onClick={handleClick}
draggable="false"
$css={css`
display: inline;
Expand All @@ -75,6 +82,6 @@ const LinkSelected = ({ url, title }: LinkSelectedProps) => {
<Text $weight="500" spellCheck="false" $size="16px" $display="inline">
{title}
</Text>
</StyledLink>
</BoxButton>
);
};
Loading