UNPKG

@ckeditor/ckeditor5-export-word

Version:

Export to Word feature for CKEditor 5.

53 lines (52 loc) 2.96 kB
/** * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options */ import type { Editor } from 'ckeditor5/src/core.js'; import type { Collection } from 'ckeditor5/src/utils.js'; import type { ExportWordConverterOptions, ExportWordConverterInternalOptions, ExportWordConverterCommentsOption, ExportWordConverterSuggestionsOption, ExportWordConverterCommentsThreadOptionsV2, ExportWordConverterOptionsV2, ExportWordConverterInternalOptionsV2, ExportWordConverterSuggestionsOptionsV2 } from './exportword.js'; import type { CommentThread } from '@ckeditor/ckeditor5-comments'; import type { SuggestionJSON } from '@ckeditor/ckeditor5-track-changes'; import type { User } from '@ckeditor/ckeditor5-collaboration-core'; /** * A helper function for getting a proper options object containing * comments, suggestions and the browser's timezone for the "Export to Word" converter. * * @param editor An editor instance. * @param converterOptionsFromConfig Converter options passed through `editor.config.exportWord.converterOptions`. */ export declare function getConverterOptions(editor: Editor, converterOptionsFromConfig?: ExportWordConverterOptions): ExportWordConverterInternalOptions; /** * A helper function for getting a comments object for the converter options. * * @param threads The comment threads array. */ export declare function getComments(threads: Array<CommentThread>): ExportWordConverterCommentsOption; /** * A helper function for getting a suggestions object for the converter options. * * @param suggestions The suggestions array. * @param users A list of all users in the editor. */ export declare function getSuggestions(suggestions: Array<SuggestionJSON>, users: Collection<User>): ExportWordConverterSuggestionsOption; /** * A helper function for getting a proper options object containing * comments, suggestions and the browser's timezone for the "Export to Word" converter for V2 API. * * @param editor An editor instance. * @param converterOptionsFromConfig Converter options passed through `editor.config.exportWord.converterOptions`. */ export declare function getConverterOptionsV2(editor: Editor, converterOptionsFromConfig?: ExportWordConverterOptionsV2): ExportWordConverterInternalOptionsV2; /** * A helper function for getting a comments object for the converter options in V2 API. * * @param threads The comment threads array. */ export declare function getCommentsV2(threads: Array<CommentThread>): ExportWordConverterCommentsThreadOptionsV2; /** * A helper function for getting a suggestions object for the converter options in V2 API. * * @param suggestions The suggestions array. * @param users A list of all users in the editor. */ export declare function getSuggestionsV2(suggestions: Array<SuggestionJSON>, users: Collection<User>): ExportWordConverterSuggestionsOptionsV2;