mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 21:23:45 +01:00
Merge pull request #24442 from overleaf/dp-writefull-parent
Provide writefull with element selectors to insert into GitOrigin-RevId: 87c9a939f7024e54adfe0b970dddb96b7f56d6b3
This commit is contained in:
@@ -18,6 +18,7 @@ const toolbarState = StateField.define<boolean>({
|
||||
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 }
|
||||
}
|
||||
|
||||
|
||||
@@ -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<void>
|
||||
|
||||
Reference in New Issue
Block a user