Skip to content

Commit 9ef0cbe

Browse files
fix: Typing after link doesn't revert to regular text (#1225)
* Added local version of autolink plugin * Added local autolink in separate extension * Small e2e test fix * Small e2e test fixes * Small e2e test fixes * Removed local autolink extension and replaced functionality by setting `inclusive` * Small fixes * Small fixes
1 parent 212f137 commit 9ef0cbe

13 files changed

+4
-0
lines changed

packages/core/src/editor/BlockNoteExtensions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export const getBlockNoteExtensions = <
8181

8282
// marks:
8383
Link.extend({
84+
inclusive: false,
8485
addKeyboardShortcuts() {
8586
return {
8687
"Mod-k": () => {

tests/src/end-to-end/ariakit/ariakit.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ test.describe("Check Ariakit UI", () => {
3535

3636
await page.keyboard.type("link");
3737
await page.keyboard.press("Enter");
38+
await page.keyboard.press("ArrowLeft");
3839

3940
await page.waitForTimeout(500);
4041
expect(await page.screenshot()).toMatchSnapshot("ariakit-link-toolbar.png");
-1.66 KB
Loading
-224 Bytes
Loading
-708 Bytes
Loading

tests/src/end-to-end/shadcn/shadcn.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ test.describe("Check ShadCN UI", () => {
3535

3636
await page.keyboard.type("link");
3737
await page.keyboard.press("Enter");
38+
await page.keyboard.press("ArrowLeft");
3839

3940
await page.waitForTimeout(500);
4041
expect(await page.screenshot()).toMatchSnapshot("shadcn-link-toolbar.png");
-1.72 KB
Loading
-302 Bytes
Loading
-728 Bytes
Loading

tests/src/end-to-end/theming/theming.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ test.describe("Check Dark Theme is Automatically Applied", () => {
4545

4646
await page.keyboard.type("link");
4747
await page.keyboard.press("Enter");
48+
await page.keyboard.press("ArrowLeft");
4849

4950
await page.waitForTimeout(500);
5051
expect(await page.screenshot()).toMatchSnapshot("dark-link-toolbar.png");

0 commit comments

Comments
 (0)