(frontend) create editor shortcuts hook

We created the editor shortcuts hook to handle
the shortcuts for the editor.
We implemented the following shortcuts:
- "@" to open the interlinking inline content
This commit is contained in:
Anthony LC
2025-04-27 22:21:20 +02:00
parent 2a7c0ef800
commit e7709badbb
8 changed files with 86 additions and 8 deletions

View File

@@ -761,4 +761,20 @@ test.describe('Doc Editor', () => {
await verifyDocName(page, docChild2);
});
test('it checks interlink shortcut @', async ({ page, browserName }) => {
const [randomDoc] = await createDoc(page, 'doc-interlink', browserName, 1);
await verifyDocName(page, randomDoc);
const editor = page.locator('.bn-block-outer').last();
await editor.click();
await page.keyboard.press('@');
await expect(
page.locator(
"span[data-inline-content-type='interlinkingSearchInline'] input",
),
).toBeVisible();
});
});