diff --git a/cypress/e2e/directediting.spec.js b/cypress/e2e/directediting.spec.js index 2fc348a015b..59288ac92c4 100644 --- a/cypress/e2e/directediting.spec.js +++ b/cypress/e2e/directediting.spec.js @@ -2,6 +2,9 @@ import { initUserAndFiles, randUser } from '../utils/index.js' const user = randUser() +/** + * Enter content and close + */ function enterContentAndClose() { cy.intercept({ method: 'POST', url: '**/session/*/close' }).as('closeRequest') cy.intercept({ method: 'POST', url: '**/session/*/push' }).as('push') diff --git a/cypress/e2e/nodes/Links.spec.js b/cypress/e2e/nodes/Links.spec.js index c9e0d886ad3..03f5c26454d 100644 --- a/cypress/e2e/nodes/Links.spec.js +++ b/cypress/e2e/nodes/Links.spec.js @@ -22,6 +22,12 @@ describe('test link marks', function() { describe('link bubble', function() { + /** + * Find link and click on it + * + * @param {string} link The link URL + * @param {object|null} options the click options + */ function clickLink(link, options = {}) { cy.getContent() .find(`a[href*="${link}"]`) diff --git a/cypress/e2e/nodes/Preview.spec.js b/cypress/e2e/nodes/Preview.spec.js index b7ac7b3c4b1..6b78e734cea 100644 --- a/cypress/e2e/nodes/Preview.spec.js +++ b/cypress/e2e/nodes/Preview.spec.js @@ -185,7 +185,7 @@ describe('Preview extension', { retries: 0 }, () => { /** * - * @param input + * @param {string} input the markdown content */ function prepareEditor(input) { loadMarkdown(editor, input) diff --git a/cypress/e2e/nodes/helpers.js b/cypress/e2e/nodes/helpers.js index 4886dd8243a..f0f57cdcbdc 100644 --- a/cypress/e2e/nodes/helpers.js +++ b/cypress/e2e/nodes/helpers.js @@ -26,8 +26,8 @@ import { createMarkdownSerializer } from './../../../src/extensions/Markdown.js' /** * - * @param editor - * @param markdown + * @param {object} editor the editor object + * @param {string} markdown the markdown content */ export function loadMarkdown(editor, markdown) { const stripped = markdown.replace(/\t*/g, '') @@ -36,7 +36,7 @@ export function loadMarkdown(editor, markdown) { /** * - * @param editor + * @param {object} editor the editor object */ export function runCommands(editor) { let found @@ -51,7 +51,7 @@ export function runCommands(editor) { /** * - * @param editor + * @param {object} editor the editor object */ function findCommand(editor) { const doc = editor.state.doc @@ -62,8 +62,8 @@ function findCommand(editor) { /** * - * @param editor - * @param markdown + * @param {object} editor the editor object + * @param {string} markdown the markdown content */ export function expectMarkdown(editor, markdown) { const stripped = markdown.replace(/\t*/g, '') @@ -72,7 +72,7 @@ export function expectMarkdown(editor, markdown) { /** * - * @param editor + * @param {object} editor the editor object */ function getMarkdown(editor) { const serializer = createMarkdownSerializer(editor.schema) diff --git a/src/components/Editor.vue b/src/components/Editor.vue index 66cfa0139e2..d064962245c 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -106,7 +106,7 @@ import { import ReadonlyBar from './Menu/ReadonlyBar.vue' import { logger } from '../helpers/logger.js' -import { getDocumentState, applyDocumentState } from '../helpers/yjs.js' +import { getDocumentState } from '../helpers/yjs.js' import { SyncService, ERROR_TYPE, IDLE_TIMEOUT } from './../services/SyncService.js' import SessionApi from '../services/SessionApi.js' import createSyncServiceProvider from './../services/SyncServiceProvider.js' diff --git a/src/nodes/Preview.js b/src/nodes/Preview.js index 2e66041e998..f04c013e26d 100644 --- a/src/nodes/Preview.js +++ b/src/nodes/Preview.js @@ -111,6 +111,7 @@ export default Node.create({ /** * Insert a preview for given link. * + * @param {string} link the link URL */ insertPreview: (link) => ({ state, chain }) => { return chain() diff --git a/src/plugins/LinkBubblePluginView.js b/src/plugins/LinkBubblePluginView.js index 42c1c618a8d..abb9c29b8e9 100644 --- a/src/plugins/LinkBubblePluginView.js +++ b/src/plugins/LinkBubblePluginView.js @@ -32,7 +32,7 @@ class LinkBubblePluginView { ) document.addEventListener('scroll', this.closeOnExternalEvents, - { capture: true } + { capture: true }, ) } @@ -45,7 +45,7 @@ class LinkBubblePluginView { ) document.removeEventListener('scroll', this.closeOnExternalEvents, - { capture: true } + { capture: true }, ) }