@ckeditor/ckeditor5-comments 41.3.1 → 41.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/build/translations/ti.js +1 -0
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +596 -0
- package/dist/index.css +990 -0
- package/dist/index.js +23 -0
- package/dist/translations/af.d.ts +8 -0
- package/dist/translations/af.js +23 -0
- package/dist/translations/af.umd.js +23 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +23 -0
- package/dist/translations/ar.umd.js +23 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +23 -0
- package/dist/translations/bg.umd.js +23 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +23 -0
- package/dist/translations/bn.umd.js +23 -0
- package/dist/translations/bs.d.ts +8 -0
- package/dist/translations/bs.js +23 -0
- package/dist/translations/bs.umd.js +23 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +23 -0
- package/dist/translations/ca.umd.js +23 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +23 -0
- package/dist/translations/cs.umd.js +23 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +23 -0
- package/dist/translations/da.umd.js +23 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +23 -0
- package/dist/translations/de-ch.umd.js +23 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +23 -0
- package/dist/translations/de.umd.js +23 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +23 -0
- package/dist/translations/el.umd.js +23 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +23 -0
- package/dist/translations/en-au.umd.js +23 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +23 -0
- package/dist/translations/en.umd.js +23 -0
- package/dist/translations/es-co.d.ts +8 -0
- package/dist/translations/es-co.js +23 -0
- package/dist/translations/es-co.umd.js +23 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +23 -0
- package/dist/translations/es.umd.js +23 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +23 -0
- package/dist/translations/et.umd.js +23 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +23 -0
- package/dist/translations/fa.umd.js +23 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +23 -0
- package/dist/translations/fi.umd.js +23 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +23 -0
- package/dist/translations/fr.umd.js +23 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +23 -0
- package/dist/translations/gl.umd.js +23 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +23 -0
- package/dist/translations/he.umd.js +23 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +23 -0
- package/dist/translations/hi.umd.js +23 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +23 -0
- package/dist/translations/hr.umd.js +23 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +23 -0
- package/dist/translations/hu.umd.js +23 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +23 -0
- package/dist/translations/id.umd.js +23 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +23 -0
- package/dist/translations/it.umd.js +23 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +23 -0
- package/dist/translations/ja.umd.js +23 -0
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +23 -0
- package/dist/translations/jv.umd.js +23 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +23 -0
- package/dist/translations/ko.umd.js +23 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +23 -0
- package/dist/translations/lt.umd.js +23 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +23 -0
- package/dist/translations/lv.umd.js +23 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +23 -0
- package/dist/translations/ms.umd.js +23 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +23 -0
- package/dist/translations/nl.umd.js +23 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +23 -0
- package/dist/translations/no.umd.js +23 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +23 -0
- package/dist/translations/pl.umd.js +23 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +23 -0
- package/dist/translations/pt-br.umd.js +23 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +23 -0
- package/dist/translations/pt.umd.js +23 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +23 -0
- package/dist/translations/ro.umd.js +23 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +23 -0
- package/dist/translations/ru.umd.js +23 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +23 -0
- package/dist/translations/sk.umd.js +23 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +23 -0
- package/dist/translations/sq.umd.js +23 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +23 -0
- package/dist/translations/sr-latn.umd.js +23 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +23 -0
- package/dist/translations/sr.umd.js +23 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +23 -0
- package/dist/translations/sv.umd.js +23 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +23 -0
- package/dist/translations/th.umd.js +23 -0
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +23 -0
- package/dist/translations/ti.umd.js +23 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +23 -0
- package/dist/translations/tk.umd.js +23 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +23 -0
- package/dist/translations/tr.umd.js +23 -0
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +23 -0
- package/dist/translations/tt.umd.js +23 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +23 -0
- package/dist/translations/ug.umd.js +23 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +23 -0
- package/dist/translations/uk.umd.js +23 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +23 -0
- package/dist/translations/ur.umd.js +23 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +23 -0
- package/dist/translations/vi.umd.js +23 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +23 -0
- package/dist/translations/zh-cn.umd.js +23 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +23 -0
- package/dist/translations/zh.umd.js +23 -0
- package/dist/types/annotations/annotation.d.ts +94 -0
- package/dist/types/annotations/annotationcollection.d.ts +102 -0
- package/dist/types/annotations/annotations.d.ts +158 -0
- package/dist/types/annotations/annotationsuis.d.ts +236 -0
- package/dist/types/annotations/editorannotations.d.ts +71 -0
- package/dist/types/annotations/inlineannotations.d.ts +94 -0
- package/dist/types/annotations/narrowsidebar.d.ts +89 -0
- package/dist/types/annotations/sidebar.d.ts +104 -0
- package/dist/types/annotations/view/annotationcounterbuttonview.d.ts +33 -0
- package/dist/types/annotations/view/annotationview.d.ts +94 -0
- package/dist/types/annotations/view/sidebaritemview.d.ts +59 -0
- package/dist/types/annotations/view/sidebarview.d.ts +36 -0
- package/dist/types/annotations/widesidebar.d.ts +81 -0
- package/dist/types/augmentation.d.ts +56 -0
- package/dist/types/comments/addcommentthreadcommand.d.ts +39 -0
- package/dist/types/comments/commentsarchive.d.ts +35 -0
- package/dist/types/comments/commentsarchiveui.d.ts +42 -0
- package/dist/types/comments/commentsediting.d.ts +84 -0
- package/dist/types/comments/commentsrepository.d.ts +1134 -0
- package/dist/types/comments/commentsui.d.ts +37 -0
- package/dist/types/comments/integrations/clipboard.d.ts +30 -0
- package/dist/types/comments/integrations/commentsrestrictededitingmode.d.ts +21 -0
- package/dist/types/comments/integrations/importword.d.ts +25 -0
- package/dist/types/comments/ui/commenteditor/commenteditor.d.ts +40 -0
- package/dist/types/comments/ui/commenteditor/commenteditorui.d.ts +35 -0
- package/dist/types/comments/ui/commenteditor/commenteditoruiview.d.ts +40 -0
- package/dist/types/comments/ui/commentthreadcontroller.d.ts +68 -0
- package/dist/types/comments/ui/view/basecommentthreadview.d.ts +123 -0
- package/dist/types/comments/ui/view/basecommentview.d.ts +116 -0
- package/dist/types/comments/ui/view/collapsedcommentsview.d.ts +17 -0
- package/dist/types/comments/ui/view/commentcontentview.d.ts +18 -0
- package/dist/types/comments/ui/view/commentinputview.d.ts +90 -0
- package/dist/types/comments/ui/view/commentsarchiveview.d.ts +42 -0
- package/dist/types/comments/ui/view/commentslistview.d.ts +104 -0
- package/dist/types/comments/ui/view/commentthreadheaderview.d.ts +54 -0
- package/dist/types/comments/ui/view/commentthreadinputview.d.ts +45 -0
- package/dist/types/comments/ui/view/commentthreadview.d.ts +122 -0
- package/dist/types/comments/ui/view/commentview.d.ts +247 -0
- package/dist/types/comments.d.ts +39 -0
- package/dist/types/commentsonly.d.ts +37 -0
- package/dist/types/config.d.ts +202 -0
- package/dist/types/index.d.ts +28 -0
- package/dist/types/utils/common-translations.d.ts +13 -0
- package/dist/types/utils/createmutationobserver.d.ts +18 -0
- package/lang/translations/ti.po +120 -0
- package/package.json +4 -3
- package/src/annotations/annotation.js +1 -1
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.d.ts +1 -1
- package/src/comments/commentsrepository.js +1 -1
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +1 -1
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +1 -1
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +1 -1
- package/src/comments/ui/view/commentview.js +1 -1
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
- package/theme/annotation.css +13 -0
- package/theme/comment.css +4 -0
- package/theme/commentinput.css +4 -0
- package/theme/commentthread.css +8 -0
- package/theme/sidebar.css +8 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import type { CommentsConfig, SidebarConfig, Annotations, AnnotationsUIs, EditorAnnotations, CommentsRepository, CommentsUI } from './index.js';
|
|
10
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
11
|
+
interface EditorConfig {
|
|
12
|
+
/**
|
|
13
|
+
* The configuration of the comments feature.
|
|
14
|
+
* Introduced by the {@link module:comments/comments~Comments} feature.
|
|
15
|
+
*
|
|
16
|
+
* Read more in {@link module:comments/config~CommentsConfig}.
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* ClassicEditor
|
|
20
|
+
* .create( {
|
|
21
|
+
* comments: ... // Locale editor configuration.
|
|
22
|
+
* } )
|
|
23
|
+
* .then( ... )
|
|
24
|
+
* .catch( ... );
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
28
|
+
*/
|
|
29
|
+
comments?: CommentsConfig;
|
|
30
|
+
/**
|
|
31
|
+
* The configuration of the sidebar feature.
|
|
32
|
+
* Introduced by the {@link module:comments/annotations/sidebar~Sidebar} feature.
|
|
33
|
+
*/
|
|
34
|
+
sidebar?: SidebarConfig;
|
|
35
|
+
/**
|
|
36
|
+
* Enables {@link module:comments/commentsonly~CommentsOnly comments-only mode} when the editor initializes.
|
|
37
|
+
*
|
|
38
|
+
* ```ts
|
|
39
|
+
* ClassicEditor
|
|
40
|
+
* .create( {
|
|
41
|
+
* commentsOnly: true
|
|
42
|
+
* } )
|
|
43
|
+
* .then( ... )
|
|
44
|
+
* .catch( ... );
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
commentsOnly?: boolean;
|
|
48
|
+
}
|
|
49
|
+
interface PluginsMap {
|
|
50
|
+
[Annotations.pluginName]: Annotations;
|
|
51
|
+
[AnnotationsUIs.pluginName]: AnnotationsUIs;
|
|
52
|
+
[EditorAnnotations.pluginName]: EditorAnnotations;
|
|
53
|
+
[CommentsRepository.pluginName]: CommentsRepository;
|
|
54
|
+
[CommentsUI.pluginName]: CommentsUI;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module comments/comments/addcommentthreadcommand
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
14
|
+
/**
|
|
15
|
+
* Adds a new CommentMarker what automatically adds corresponding CommentThread to the CommentsEditing#threads collection.
|
|
16
|
+
* Note this command adds only a CommentThread draft, to make is public marker has to be changed to be managed using operation.
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* // If `threadId` is not specified, `addCommentThread()` will generate a unique ID and use it:
|
|
20
|
+
* editor.execute( 'addCommentThread' );
|
|
21
|
+
*
|
|
22
|
+
* // If you want to specify the exact thread ID, pass it through the optional `threadId` configuration parameter.
|
|
23
|
+
* editor.execute( 'addCommentThread', { threadId: 'thread-1' } );
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export default class AddCommentThreadCommand extends Command {
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
refresh(): void;
|
|
31
|
+
/**
|
|
32
|
+
* @fires execute
|
|
33
|
+
* @param options Options for executed command.
|
|
34
|
+
* @param options.threadId Id of comment marker that will be added.
|
|
35
|
+
*/
|
|
36
|
+
execute({ threadId }?: {
|
|
37
|
+
threadId?: string | undefined;
|
|
38
|
+
}): void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module comments/comments/commentsarchive
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
|
|
14
|
+
import { Collection } from 'ckeditor5/src/utils.js';
|
|
15
|
+
import CommentsRepository, { type CommentThread } from './commentsrepository.js';
|
|
16
|
+
import Annotations from '../annotations/annotations.js';
|
|
17
|
+
/**
|
|
18
|
+
* This plugin handles all operations on archived threads needed for the comments archive.
|
|
19
|
+
*/
|
|
20
|
+
export default class CommentsArchive extends ContextPlugin {
|
|
21
|
+
archivedThreads: Collection<CommentThread>;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get pluginName(): "CommentsArchive";
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get requires(): readonly [typeof CommentsRepository, typeof Annotations];
|
|
30
|
+
constructor(context: Context | Editor);
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
init(): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module comments/comments/commentsarchiveui
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import '../../theme/commentsarchive.css';
|
|
14
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
15
|
+
import { ViewCollection, Dialog } from 'ckeditor5/src/ui.js';
|
|
16
|
+
import CommentsArchiveView from './ui/view/commentsarchiveview.js';
|
|
17
|
+
import CommentsArchive from './commentsarchive.js';
|
|
18
|
+
import type AnnotationView from '../annotations/view/annotationview.js';
|
|
19
|
+
/**
|
|
20
|
+
* Creates comments archive {@link module:ui/dropdown/dropdownview~DropdownView ui dropdown} and binds with
|
|
21
|
+
* archived comment thread annotation views.
|
|
22
|
+
*/
|
|
23
|
+
export default class CommentsArchiveUI extends Plugin {
|
|
24
|
+
commentsArchiveView: CommentsArchiveView | undefined;
|
|
25
|
+
annotationViews: ViewCollection<AnnotationView>;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName(): "CommentsArchiveUI";
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
static get requires(): readonly [typeof CommentsArchive, typeof Dialog];
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
constructor(editor: Editor);
|
|
38
|
+
/**
|
|
39
|
+
* @inheritDoc
|
|
40
|
+
*/
|
|
41
|
+
init(): void;
|
|
42
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module comments/comments/commentsediting
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import type { Marker } from 'ckeditor5/src/engine.js';
|
|
14
|
+
import CommentsRepository from './commentsrepository.js';
|
|
15
|
+
import EditorAnnotations from '../annotations/editorannotations.js';
|
|
16
|
+
import CommentsRestrictedEditingMode from './integrations/commentsrestrictededitingmode.js';
|
|
17
|
+
import CommentsImportWord from './integrations/importword.js';
|
|
18
|
+
import CommentsClipboard from './integrations/clipboard.js';
|
|
19
|
+
import '../../theme/commentmarker.css';
|
|
20
|
+
/**
|
|
21
|
+
* Plugin that keeps in sync comments in {@link module:comments/comments/commentsrepository~CommentsRepository} with
|
|
22
|
+
* {@link module:engine/model/markercollection~Marker comment markers}.
|
|
23
|
+
*/
|
|
24
|
+
export default class CommentsEditing extends Plugin {
|
|
25
|
+
/**
|
|
26
|
+
* If set to `true`, the plugin won't load comment thread for the new marker immediately after the marker is added to the editor.
|
|
27
|
+
* Instead, the plugin will wait until the flag will be set to `false` and then load missing comments.
|
|
28
|
+
*
|
|
29
|
+
* It's useful to hold fetching comments from the server when comments are used with real-time collaboration.
|
|
30
|
+
* When a user connects to an existing document, the operations from the history need to be applied one by one.
|
|
31
|
+
* An operation which added a new comment marker might be followed by an operation which removes that marker, so it's not
|
|
32
|
+
* necessary to make an additional request then.
|
|
33
|
+
*
|
|
34
|
+
* @observable
|
|
35
|
+
*/
|
|
36
|
+
isThreadsLoadingPaused: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Name of the active comment marker.
|
|
39
|
+
*
|
|
40
|
+
* Markers conversion checks if comment should be marked as active and adds/removes additional css class during the conversion.
|
|
41
|
+
*
|
|
42
|
+
* @observable
|
|
43
|
+
*/
|
|
44
|
+
activeMarker: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc
|
|
47
|
+
*/
|
|
48
|
+
static get requires(): readonly [typeof CommentsRepository, typeof EditorAnnotations, typeof CommentsRestrictedEditingMode, typeof CommentsImportWord, typeof CommentsClipboard];
|
|
49
|
+
/**
|
|
50
|
+
* @inheritDoc
|
|
51
|
+
*/
|
|
52
|
+
static get pluginName(): "CommentsEditing";
|
|
53
|
+
/**
|
|
54
|
+
* @inheritDoc
|
|
55
|
+
*/
|
|
56
|
+
constructor(editor: Editor);
|
|
57
|
+
/**
|
|
58
|
+
* @inheritDoc
|
|
59
|
+
*/
|
|
60
|
+
init(): void;
|
|
61
|
+
/**
|
|
62
|
+
* @inheritDoc
|
|
63
|
+
*/
|
|
64
|
+
destroy(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Returns `true` if there is at least one marker in the content that is related to a comment thread with given `threadId`.
|
|
67
|
+
*
|
|
68
|
+
* @param threadId Comment thread id.
|
|
69
|
+
*/
|
|
70
|
+
hasMarkerForId(threadId: string): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Returns all markers that are related to the comment thread with the given `threadId`.
|
|
73
|
+
*
|
|
74
|
+
* @param threadId Comment thread id.
|
|
75
|
+
* @returns Array with all markers related to given comment thread.
|
|
76
|
+
*/
|
|
77
|
+
getAllMarkersForId(threadId: string): Array<Marker>;
|
|
78
|
+
/**
|
|
79
|
+
* Scrolls editing view to the first thread marker.
|
|
80
|
+
*
|
|
81
|
+
* @param threadId Comment thread id.
|
|
82
|
+
*/
|
|
83
|
+
scrollToThreadMarker(threadId: string): void;
|
|
84
|
+
}
|