| 5 | } |
| 6 | |
| 7 | interface DocEditorConfig { |
| 8 | document: { |
| 9 | title: string; |
| 10 | url: string; |
| 11 | fileType: string; |
| 12 | permissions: { |
| 13 | edit: boolean; |
| 14 | chat: boolean; |
| 15 | protect: boolean; |
| 16 | download?: boolean; |
| 17 | }; |
| 18 | }; |
| 19 | editorConfig: { |
| 20 | lang: string; |
| 21 | customization: { |
| 22 | help: boolean; |
| 23 | about: boolean; |
| 24 | hideRightMenu: boolean; |
| 25 | /** Enable/disable plugins. Set to false to disable plugins */ |
| 26 | plugins?: boolean; |
| 27 | features: { |
| 28 | spellcheck: { |
| 29 | change: boolean; |
| 30 | }; |
| 31 | }; |
| 32 | anonymous: { |
| 33 | request: boolean; |
| 34 | label: string; |
| 35 | }; |
| 36 | }; |
| 37 | /** Plugin configuration. Can specify a list of plugins to load */ |
| 38 | plugins?: { |
| 39 | pluginsData?: PluginConfig[]; |
| 40 | }; |
| 41 | }; |
| 42 | events: { |
| 43 | onAppReady: () => void; |
| 44 | onDocumentReady: () => void; |
| 45 | onSave: (event: SaveEvent) => void; |
| 46 | onDownloadAs?: (event: DownloadAsEvent) => void; |
| 47 | writeFile: (event: WriteFileEvent) => void; |
| 48 | /** Handle external messages from plugins */ |
| 49 | onExternalPluginMessage?: (event: { type: string; data: any; pluginName?: string }) => void; |
| 50 | }; |
| 51 | } |
| 52 | |
| 53 | interface SaveEvent { |
| 54 | data: { |
nothing calls this directly
no outgoing calls
no test coverage detected