diff --git a/services/web/frontend/js/features/source-editor/extensions/toolbar/toolbar-panel.ts b/services/web/frontend/js/features/source-editor/extensions/toolbar/toolbar-panel.ts index ebc12b28a1..ae8dfc8578 100644 --- a/services/web/frontend/js/features/source-editor/extensions/toolbar/toolbar-panel.ts +++ b/services/web/frontend/js/features/source-editor/extensions/toolbar/toolbar-panel.ts @@ -18,6 +18,7 @@ const toolbarState = StateField.define({ export function createToolbarPanel() { const dom = document.createElement('div') dom.classList.add('ol-cm-toolbar-portal') + dom.id = 'ol-cm-toolbar-portal' return { dom, top: true } } diff --git a/services/web/frontend/js/shared/context/types/writefull-instance.ts b/services/web/frontend/js/shared/context/types/writefull-instance.ts index 7dab3e0913..0040422548 100644 --- a/services/web/frontend/js/shared/context/types/writefull-instance.ts +++ b/services/web/frontend/js/shared/context/types/writefull-instance.ts @@ -6,11 +6,20 @@ export interface WritefullEvents { 'writefull-register-as-auto-account': { email: string } } +type InsertPosition = { + parentSelector: string + insertBeforeSelector?: string +} + export interface WritefullAPI { init({ + toolbarPosition, + iconPosition, hasAgreedToTOS, overleafUserId, }: { + toolbarPosition: InsertPosition + iconPosition: InsertPosition hasAgreedToTOS: boolean overleafUserId: string }): Promise