@ckeditor/ckeditor5-collaboration-core 0.0.0-internal-20241017.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/CHANGELOG.md +4 -0
- package/LICENSE.md +23 -0
- package/README.md +35 -0
- package/dist/augmentation.d.ts +42 -0
- package/dist/collaborationhistory.d.ts +25 -0
- package/dist/collaborationoperation.d.ts +32 -0
- package/dist/config.d.ts +106 -0
- package/dist/index-content.css +470 -0
- package/dist/index-editor.css +426 -0
- package/dist/index.css +1080 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +23 -0
- package/dist/legacyerrors.d.ts +33 -0
- package/dist/permissions.d.ts +58 -0
- package/dist/suggestions/view/ariadescriptionview.d.ts +27 -0
- package/dist/suggestions/view/latefocusbuttonview.d.ts +41 -0
- package/dist/suggestionstyles.d.ts +18 -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/az.d.ts +8 -0
- package/dist/translations/az.js +23 -0
- package/dist/translations/az.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/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/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/users/view/userview.d.ts +20 -0
- package/dist/users.d.ts +172 -0
- package/dist/utils/common-translations.d.ts +13 -0
- package/dist/utils/confirmmixin.d.ts +28 -0
- package/dist/utils/confirmview.d.ts +33 -0
- package/dist/utils/getdatetimeformatter.d.ts +33 -0
- package/dist/utils/getmarkerdomelement.d.ts +26 -0
- package/dist/utils/hashobject.d.ts +12 -0
- package/dist/utils/sanitizeEditorConfig.d.ts +19 -0
- package/dist/utils/setupthreadkeyboardnavigation.d.ts +49 -0
- package/dist/utils/surroundingmarkersdetector.d.ts +20 -0
- package/dist/utils/trim-html.d.ts +23 -0
- package/lang/contexts.json +6 -0
- package/lang/translations/af.po +34 -0
- package/lang/translations/ar.po +34 -0
- package/lang/translations/az.po +34 -0
- package/lang/translations/bg.po +34 -0
- package/lang/translations/bn.po +34 -0
- package/lang/translations/bs.po +34 -0
- package/lang/translations/ca.po +34 -0
- package/lang/translations/cs.po +34 -0
- package/lang/translations/da.po +34 -0
- package/lang/translations/de-ch.po +34 -0
- package/lang/translations/de.po +34 -0
- package/lang/translations/el.po +34 -0
- package/lang/translations/en-au.po +34 -0
- package/lang/translations/en.po +34 -0
- package/lang/translations/es-co.po +34 -0
- package/lang/translations/es.po +34 -0
- package/lang/translations/et.po +34 -0
- package/lang/translations/fa.po +34 -0
- package/lang/translations/fi.po +34 -0
- package/lang/translations/fr.po +34 -0
- package/lang/translations/gl.po +34 -0
- package/lang/translations/he.po +34 -0
- package/lang/translations/hi.po +34 -0
- package/lang/translations/hr.po +34 -0
- package/lang/translations/hu.po +34 -0
- package/lang/translations/id.po +34 -0
- package/lang/translations/it.po +34 -0
- package/lang/translations/ja.po +34 -0
- package/lang/translations/jv.po +34 -0
- package/lang/translations/ko.po +34 -0
- package/lang/translations/lt.po +34 -0
- package/lang/translations/lv.po +34 -0
- package/lang/translations/ms.po +34 -0
- package/lang/translations/nl.po +34 -0
- package/lang/translations/no.po +34 -0
- package/lang/translations/pl.po +34 -0
- package/lang/translations/pt-br.po +34 -0
- package/lang/translations/pt.po +34 -0
- package/lang/translations/ro.po +34 -0
- package/lang/translations/ru.po +34 -0
- package/lang/translations/sk.po +34 -0
- package/lang/translations/sr-latn.po +34 -0
- package/lang/translations/sr.po +34 -0
- package/lang/translations/sv.po +34 -0
- package/lang/translations/th.po +34 -0
- package/lang/translations/tk.po +34 -0
- package/lang/translations/tr.po +34 -0
- package/lang/translations/tt.po +34 -0
- package/lang/translations/ug.po +34 -0
- package/lang/translations/uk.po +34 -0
- package/lang/translations/ur.po +34 -0
- package/lang/translations/vi.po +34 -0
- package/lang/translations/zh-cn.po +34 -0
- package/lang/translations/zh.po +34 -0
- package/package.json +52 -0
- package/src/augmentation.d.ts +38 -0
- package/src/augmentation.js +23 -0
- package/src/collaborationhistory.d.ts +21 -0
- package/src/collaborationhistory.js +23 -0
- package/src/collaborationoperation.d.ts +28 -0
- package/src/collaborationoperation.js +23 -0
- package/src/config.d.ts +102 -0
- package/src/config.js +23 -0
- package/src/index.d.ts +22 -0
- package/src/index.js +23 -0
- package/src/legacyerrors.d.ts +29 -0
- package/src/legacyerrors.js +23 -0
- package/src/permissions.d.ts +54 -0
- package/src/permissions.js +23 -0
- package/src/suggestions/view/ariadescriptionview.d.ts +23 -0
- package/src/suggestions/view/ariadescriptionview.js +23 -0
- package/src/suggestions/view/latefocusbuttonview.d.ts +37 -0
- package/src/suggestions/view/latefocusbuttonview.js +23 -0
- package/src/suggestionstyles.d.ts +14 -0
- package/src/suggestionstyles.js +23 -0
- package/src/users/view/userview.d.ts +16 -0
- package/src/users/view/userview.js +23 -0
- package/src/users.d.ts +168 -0
- package/src/users.js +23 -0
- package/src/utils/common-translations.d.ts +9 -0
- package/src/utils/common-translations.js +23 -0
- package/src/utils/confirmmixin.d.ts +24 -0
- package/src/utils/confirmmixin.js +23 -0
- package/src/utils/confirmview.d.ts +29 -0
- package/src/utils/confirmview.js +23 -0
- package/src/utils/getdatetimeformatter.d.ts +29 -0
- package/src/utils/getdatetimeformatter.js +23 -0
- package/src/utils/getmarkerdomelement.d.ts +22 -0
- package/src/utils/getmarkerdomelement.js +23 -0
- package/src/utils/hashobject.d.ts +8 -0
- package/src/utils/hashobject.js +23 -0
- package/src/utils/sanitizeEditorConfig.d.ts +15 -0
- package/src/utils/sanitizeEditorConfig.js +23 -0
- package/src/utils/setupthreadkeyboardnavigation.d.ts +45 -0
- package/src/utils/setupthreadkeyboardnavigation.js +23 -0
- package/src/utils/surroundingmarkersdetector.d.ts +16 -0
- package/src/utils/surroundingmarkersdetector.js +23 -0
- package/src/utils/trim-html.d.ts +19 -0
- package/src/utils/trim-html.js +23 -0
- package/theme/ariadescription.css +12 -0
- package/theme/icons/notification.svg +11 -0
- package/theme/integrations/codeblock.css +17 -0
- package/theme/integrations/horizontalline.css +24 -0
- package/theme/integrations/image.css +66 -0
- package/theme/integrations/mediaembed.css +28 -0
- package/theme/integrations/mergefields.css +67 -0
- package/theme/integrations/pagebreak.css +24 -0
- package/theme/integrations/table.css +200 -0
- package/theme/suggestion.css +131 -0
- package/theme/suggestionmarker.css +162 -0
- package/theme/usercolormixin.css +41 -0
- package/theme/usercolors.css +49 -0
- package/theme/users.css +110 -0
package/CHANGELOG.md
ADDED
package/LICENSE.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Software License Agreement
|
|
2
|
+
==========================
|
|
3
|
+
|
|
4
|
+
**CKEditor 5 collaboration core** (https://ckeditor.com/collaboration/)<br>
|
|
5
|
+
Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
|
6
|
+
|
|
7
|
+
CKEditor 5 collaboration core is licensed under a commercial license and is protected by copyright law.
|
|
8
|
+
For more details about available licensing options please contact us at sales@cksource.com.
|
|
9
|
+
|
|
10
|
+
Sources of Intellectual Property Included in CKEditor 5 collaboration core
|
|
11
|
+
-------------------------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
Where not otherwise indicated, all CKEditor 5 collaboration core content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
|
|
14
|
+
|
|
15
|
+
The following libraries are included in CKEditor 5 collaboration core under the [MIT license](https://opensource.org/licenses/MIT):
|
|
16
|
+
|
|
17
|
+
* date-fns - Copyright (c) 2021 Sasha Koss and Lesha Koss https://kossnocorp.mit-license.org.
|
|
18
|
+
* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
|
|
19
|
+
|
|
20
|
+
Trademarks
|
|
21
|
+
----------
|
|
22
|
+
|
|
23
|
+
**CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks, or service marks of their respective holders.
|
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# CKEditor 5 collaboration core
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@ckeditor/ckeditor5-collaboration-core)
|
|
4
|
+
|
|
5
|
+
CKEditor 5 collaboration core is a low-level API that provides base features to support multiple users working together in a rich text editor. It is used in collaborative features such as [comments](https://ckeditor.com/collaboration/comments/), [track changes](https://ckeditor.com/collaboration/track-changes/) or [real-time collaboration](https://ckeditor.com/collaboration/real-time/) in CKEditor 5.
|
|
6
|
+
|
|
7
|
+
## Documentation
|
|
8
|
+
|
|
9
|
+
For more information about collaboration features visit [CKEditor 5 collaboration features overview documentation](https://ckeditor.com/docs/ckeditor5/latest/features/collaboration/collaboration.html).
|
|
10
|
+
|
|
11
|
+
Also, make sure you visit the [CKEditor 5 changelog](https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md) whenever a new version of the package is released.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install ckeditor5-premium-features
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Getting support
|
|
20
|
+
|
|
21
|
+
CKEditor 5 collaboration core comes with outstanding support from a dedicated team of customer care specialists, QA engineers and CKEditor 5 developers. The team will gladly assist you in all aspects from setting up your account to integrating CKEditor 5 collaboration features with your application.
|
|
22
|
+
|
|
23
|
+
As a licensed CKEditor 5 collaboration features user you can report bugs and request features directly through the CKEditor Ecosystem customer dashboard.
|
|
24
|
+
|
|
25
|
+
## License
|
|
26
|
+
|
|
27
|
+
**CKEditor 5 collaboration core**<br>
|
|
28
|
+
Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
|
29
|
+
|
|
30
|
+
CKEditor 5 collaboration core is licensed under a commercial license and is protected by copyright law.
|
|
31
|
+
For more details about available licensing options please contact us at sales@cksource.com.
|
|
32
|
+
|
|
33
|
+
### Trademarks
|
|
34
|
+
|
|
35
|
+
**CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
|
|
@@ -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
|
+
import type { LocaleConfig, Users } from './index.js';
|
|
10
|
+
import type { RealTimeCollaborationConfig } from './config.js';
|
|
11
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
12
|
+
interface EditorConfig {
|
|
13
|
+
/**
|
|
14
|
+
* The locale configuration of the editor.
|
|
15
|
+
*/
|
|
16
|
+
locale?: LocaleConfig;
|
|
17
|
+
/**
|
|
18
|
+
* The users plugin configuration.
|
|
19
|
+
*/
|
|
20
|
+
users?: {
|
|
21
|
+
/**
|
|
22
|
+
* User ID value that will be used for the anonymous user.
|
|
23
|
+
*/
|
|
24
|
+
anonymousUserId?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Number of defined colors that are randomly assigned to users.
|
|
27
|
+
*/
|
|
28
|
+
colorsCount?: number;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The configuration of the real time collaboration feature.
|
|
32
|
+
*
|
|
33
|
+
* Read more in {@link module:collaboration-core/config~RealTimeCollaborationConfig}.
|
|
34
|
+
*
|
|
35
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
36
|
+
*/
|
|
37
|
+
collaboration?: RealTimeCollaborationConfig;
|
|
38
|
+
}
|
|
39
|
+
interface PluginsMap {
|
|
40
|
+
[Users.pluginName]: Users;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 collaboration-core/collaborationhistory
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import type { default as CollaborationOperation } from './collaborationoperation.js';
|
|
14
|
+
/**
|
|
15
|
+
* Interface compatible with {@link module:engine/model/history~History} with the difference that it uses
|
|
16
|
+
* {@link module:collaboration-core/collaborationoperation~CollaborationOperation} instead of regular model operations.
|
|
17
|
+
*/
|
|
18
|
+
export default interface CollaborationHistory {
|
|
19
|
+
_operations: Array<CollaborationOperation>;
|
|
20
|
+
version: number;
|
|
21
|
+
getOperations(fromBaseVersion?: number, toBaseVersion?: number): Array<CollaborationOperation>;
|
|
22
|
+
getOperation(baseVersion: number): CollaborationOperation | undefined;
|
|
23
|
+
addOperation(operation: CollaborationOperation): void;
|
|
24
|
+
reset(): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 collaboration-core/collaborationoperation
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import type { Operation, InsertOperation, MergeOperation, MoveOperation, SplitOperation, MarkerOperation, RootOperation, RootAttributeOperation } from 'ckeditor5/src/engine.js';
|
|
14
|
+
/**
|
|
15
|
+
* Extends the {@link module:engine/model/operation/operation operation}.
|
|
16
|
+
*/
|
|
17
|
+
export default interface CollaborationOperation extends Operation {
|
|
18
|
+
_isInit?: boolean;
|
|
19
|
+
_authorId?: null | string;
|
|
20
|
+
_isDisconnection?: boolean;
|
|
21
|
+
createdAt?: Date;
|
|
22
|
+
wasUndone?: boolean;
|
|
23
|
+
affectsData?: Record<string, any>;
|
|
24
|
+
clone(): CollaborationOperation;
|
|
25
|
+
}
|
|
26
|
+
export type InsertCollaborationOperation = CollaborationOperation & InsertOperation;
|
|
27
|
+
export type MoveCollaborationOperation = CollaborationOperation & MoveOperation;
|
|
28
|
+
export type MergeCollaborationOperation = CollaborationOperation & MergeOperation;
|
|
29
|
+
export type SplitCollaborationOperation = CollaborationOperation & SplitOperation;
|
|
30
|
+
export type MarkerCollaborationOperation = CollaborationOperation & MarkerOperation;
|
|
31
|
+
export type RootCollaborationOperation = CollaborationOperation & RootOperation;
|
|
32
|
+
export type RootAttributeCollaborationOperation = CollaborationOperation & RootAttributeOperation;
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
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 collaboration-core/config
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* The locale configuration.
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* ClassicEditor
|
|
18
|
+
* .create( {
|
|
19
|
+
* locale: {
|
|
20
|
+
* // The localization configuration.
|
|
21
|
+
* }
|
|
22
|
+
* } )
|
|
23
|
+
* .then( ... )
|
|
24
|
+
* .catch( ... );
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
|
|
28
|
+
*/
|
|
29
|
+
export interface LocaleConfig {
|
|
30
|
+
/**
|
|
31
|
+
* A function that formats date to the custom format. It is used in dates in annotations (balloons) displaying
|
|
32
|
+
* comments and suggestions details.
|
|
33
|
+
*
|
|
34
|
+
* The default formatting can be changed by setting a custom formatting function to `config.locale.dateTimeFormat`.
|
|
35
|
+
*
|
|
36
|
+
* ```ts
|
|
37
|
+
* import format from 'date-fns/format';
|
|
38
|
+
*
|
|
39
|
+
* ClassicEditor
|
|
40
|
+
* .create( document.querySelector( '#editor' ), {
|
|
41
|
+
* toolbar: {
|
|
42
|
+
* items: [ 'bold', 'italic', '|', 'comment' ]
|
|
43
|
+
* },
|
|
44
|
+
* sidebar: {
|
|
45
|
+
* container: document.querySelector( '#sidebar' )
|
|
46
|
+
* },
|
|
47
|
+
* locale: {
|
|
48
|
+
* dateTimeFormat: date => format( date, 'dd/MM/yyyy' )
|
|
49
|
+
* }
|
|
50
|
+
* } )
|
|
51
|
+
* .catch( error => console.error( error ) );
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @returns The generated date.
|
|
55
|
+
*/
|
|
56
|
+
dateTimeFormat?: (date: Date) => string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The configuration of the real-time collaboration features.
|
|
60
|
+
*
|
|
61
|
+
* ```ts
|
|
62
|
+
* ClassicEditor
|
|
63
|
+
* .create( {
|
|
64
|
+
* collaboration: ... // Collaboration features configuration.
|
|
65
|
+
* } )
|
|
66
|
+
* .then( ... )
|
|
67
|
+
* .catch( ... );
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
71
|
+
*/
|
|
72
|
+
export interface RealTimeCollaborationConfig {
|
|
73
|
+
/**
|
|
74
|
+
* The channel ID is a unique ID that identifies the data loaded in the editor instance or used by
|
|
75
|
+
* the context instance.
|
|
76
|
+
*
|
|
77
|
+
* If specified for the editor, it is the document ID.
|
|
78
|
+
*
|
|
79
|
+
* If you are using multiple editors instances at the same time, each of them should use a different
|
|
80
|
+
* channel ID to connect to a specific document.
|
|
81
|
+
*
|
|
82
|
+
* If specified for context, it is the ID for all the data related to context instance.
|
|
83
|
+
* This ID will be used for data that is not related to an editor instance, for example comments
|
|
84
|
+
* outside the editor.
|
|
85
|
+
*
|
|
86
|
+
* In the case of context, the ID can be an ID of a subpage or a form, or a different entity accordingly
|
|
87
|
+
* to your application.
|
|
88
|
+
*
|
|
89
|
+
* The channel ID can be used to recognize entity to which piece of data belongs in integrations that use `Context`
|
|
90
|
+
* and context plugins. For example, if you are preparing a custom integration using the comments API,
|
|
91
|
+
* you can use the channel ID to recognize whether the comment was added to an editor instance
|
|
92
|
+
* (and which one) or to the context.
|
|
93
|
+
*
|
|
94
|
+
* ```ts
|
|
95
|
+
* ClassicEditor
|
|
96
|
+
* .create( {
|
|
97
|
+
* collaboration: {
|
|
98
|
+
* channelId: 'your-channel-id'
|
|
99
|
+
* }
|
|
100
|
+
* } )
|
|
101
|
+
* .then( ... )
|
|
102
|
+
* .catch( ... );
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
channelId?: string;
|
|
106
|
+
}
|