diff --git a/playwright/support/fixtures/editor-api.ts b/playwright/support/fixtures/editor-api.ts index 8663d178cc5..d188fdd31ea 100644 --- a/playwright/support/fixtures/editor-api.ts +++ b/playwright/support/fixtures/editor-api.ts @@ -49,7 +49,6 @@ export const test = base.extend({ document.body.appendChild(container) const method = type === 'editor' ? 'createEditor' : 'createTable' - // @ts-expect-error - OCA.Text is a global await window.OCA.Text[method]({ el: container, ...(fileId != null ? { fileId } : { content }), diff --git a/src/public.js b/src/public.js index 08efad7ef2d..3757b337fd6 100644 --- a/src/public.js +++ b/src/public.js @@ -6,6 +6,7 @@ import { loadState } from '@nextcloud/initial-state' OCA.Text = { + ...(window?.OCA?.Text ?? {}), RichWorkspaceEnabled: loadState('text', 'workspace_available'), OpenReadOnlyEnabled: loadState('text', 'open_read_only_enabled'), }