@ckeditor/ckeditor5-slash-command 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 +18 -0
- package/README.md +41 -0
- package/build/slash-command.js +5 -0
- package/build/translations/ar.js +1 -0
- package/build/translations/bg.js +1 -0
- package/build/translations/bn.js +1 -0
- package/build/translations/ca.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/fi.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/he.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ja.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/lt.js +1 -0
- package/build/translations/lv.js +1 -0
- package/build/translations/ms.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/pt.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/sv.js +1 -0
- package/build/translations/th.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/uz.js +1 -0
- package/build/translations/vi.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +14 -0
- package/dist/augmentation.d.ts +25 -0
- package/dist/index-content.css +5 -0
- package/dist/index-editor.css +70 -0
- package/dist/index.css +84 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +23 -0
- package/dist/legacyerrors.d.ts +24 -0
- package/dist/slashcommand.d.ts +41 -0
- package/dist/slashcommandconfig.d.ts +254 -0
- package/dist/slashcommandediting.d.ts +40 -0
- package/dist/slashcommandeditorconfig.d.ts +100 -0
- package/dist/slashcommandui.d.ts +45 -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/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.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.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/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/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.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/tr.d.ts +8 -0
- package/dist/translations/tr.js +23 -0
- package/dist/translations/tr.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/uz.d.ts +8 -0
- package/dist/translations/uz.js +23 -0
- package/dist/translations/uz.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/ui/slashcommandbuttonview.d.ts +35 -0
- package/dist/utils/common-translations.d.ts +13 -0
- package/lang/contexts.json +25 -0
- package/lang/translations/ar.po +110 -0
- package/lang/translations/bg.po +110 -0
- package/lang/translations/bn.po +110 -0
- package/lang/translations/ca.po +110 -0
- package/lang/translations/cs.po +110 -0
- package/lang/translations/da.po +110 -0
- package/lang/translations/de.po +110 -0
- package/lang/translations/el.po +110 -0
- package/lang/translations/en-au.po +110 -0
- package/lang/translations/en.po +110 -0
- package/lang/translations/es.po +110 -0
- package/lang/translations/et.po +110 -0
- package/lang/translations/fi.po +110 -0
- package/lang/translations/fr.po +110 -0
- package/lang/translations/gl.po +110 -0
- package/lang/translations/he.po +110 -0
- package/lang/translations/hi.po +110 -0
- package/lang/translations/hr.po +110 -0
- package/lang/translations/hu.po +110 -0
- package/lang/translations/id.po +110 -0
- package/lang/translations/it.po +110 -0
- package/lang/translations/ja.po +110 -0
- package/lang/translations/ko.po +110 -0
- package/lang/translations/lt.po +110 -0
- package/lang/translations/lv.po +110 -0
- package/lang/translations/ms.po +110 -0
- package/lang/translations/nl.po +110 -0
- package/lang/translations/no.po +110 -0
- package/lang/translations/pl.po +110 -0
- package/lang/translations/pt-br.po +110 -0
- package/lang/translations/pt.po +110 -0
- package/lang/translations/ro.po +110 -0
- package/lang/translations/ru.po +110 -0
- package/lang/translations/sk.po +110 -0
- package/lang/translations/sr.po +110 -0
- package/lang/translations/sv.po +110 -0
- package/lang/translations/th.po +110 -0
- package/lang/translations/tr.po +110 -0
- package/lang/translations/uk.po +110 -0
- package/lang/translations/uz.po +110 -0
- package/lang/translations/vi.po +110 -0
- package/lang/translations/zh-cn.po +110 -0
- package/lang/translations/zh.po +110 -0
- package/package.json +37 -0
- package/src/augmentation.d.ts +21 -0
- package/src/augmentation.js +23 -0
- package/src/index.d.ts +13 -0
- package/src/index.js +23 -0
- package/src/legacyerrors.d.ts +20 -0
- package/src/legacyerrors.js +23 -0
- package/src/slashcommand.d.ts +37 -0
- package/src/slashcommand.js +23 -0
- package/src/slashcommandconfig.d.ts +250 -0
- package/src/slashcommandconfig.js +23 -0
- package/src/slashcommandediting.d.ts +36 -0
- package/src/slashcommandediting.js +23 -0
- package/src/slashcommandeditorconfig.d.ts +96 -0
- package/src/slashcommandeditorconfig.js +23 -0
- package/src/slashcommandui.d.ts +41 -0
- package/src/slashcommandui.js +23 -0
- package/src/ui/slashcommandbuttonview.d.ts +31 -0
- package/src/ui/slashcommandbuttonview.js +23 -0
- package/src/utils/common-translations.d.ts +9 -0
- package/src/utils/common-translations.js +23 -0
- package/theme/icons/play.svg +1 -0
- package/theme/slashcommand.css +77 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plugins": [
|
|
3
|
+
{
|
|
4
|
+
"name": "Slash command",
|
|
5
|
+
"className": "SlashCommand",
|
|
6
|
+
"description": "Allows for easy access to a predefined list of editor commands by typing <kbd>/</kbd> inside the editor.",
|
|
7
|
+
"docs": "features/slash-commands.html",
|
|
8
|
+
"path": "src/slashcommand.js",
|
|
9
|
+
"requires": [
|
|
10
|
+
"Mention"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -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
|
+
import type { SlashCommand, SlashCommandConfig, SlashCommandEditing, SlashCommandUI, SlashCommandEditorConfig } from './index.js';
|
|
10
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
11
|
+
interface EditorConfig {
|
|
12
|
+
/**
|
|
13
|
+
* The configuration of the {@link module:slash-command/slashcommand~SlashCommand} feature.
|
|
14
|
+
*
|
|
15
|
+
* Read more in {@link module:slash-command/slashcommandeditorconfig~SlashCommandEditorConfig}.
|
|
16
|
+
*/
|
|
17
|
+
slashCommand?: SlashCommandEditorConfig;
|
|
18
|
+
}
|
|
19
|
+
interface PluginsMap {
|
|
20
|
+
[SlashCommand.pluginName]: SlashCommand;
|
|
21
|
+
[SlashCommandConfig.pluginName]: SlashCommandConfig;
|
|
22
|
+
[SlashCommandEditing.pluginName]: SlashCommandEditing;
|
|
23
|
+
[SlashCommandUI.pluginName]: SlashCommandUI;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
:root{
|
|
6
|
+
--ck-slash-command-button-width:250px;
|
|
7
|
+
--ck-slash-command-description-width:200px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button{
|
|
11
|
+
display:flex;
|
|
12
|
+
justify-content:flex-start;
|
|
13
|
+
width:var(--ck-slash-command-button-width);
|
|
14
|
+
padding:calc(.2 * var(--ck-line-height-base) * var(--ck-font-size-base));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button .ck.ck-icon{
|
|
18
|
+
flex-shrink:0;
|
|
19
|
+
margin-left:0;
|
|
20
|
+
padding:5px;
|
|
21
|
+
color:var(--ck-color-base-text);
|
|
22
|
+
background-color:var(--ck-color-base-background);
|
|
23
|
+
border-radius:2px;
|
|
24
|
+
box-sizing:initial;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
[dir="ltr"] .ck-mentions .ck.ck-button.ck-slash-command-button .ck.ck-icon{
|
|
28
|
+
margin:0 var(--ck-spacing-small) 0 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[dir="rtl"] .ck-mentions .ck.ck-button.ck-slash-command-button .ck.ck-icon{
|
|
32
|
+
margin:0 0 0 var(--ck-spacing-small);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part{
|
|
36
|
+
display:flex;
|
|
37
|
+
flex-direction:column;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[dir="ltr"] .ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part{
|
|
41
|
+
margin-left:var(--ck-spacing-small);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[dir="rtl"] .ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part{
|
|
45
|
+
margin-right:var(--ck-spacing-small);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part > span{
|
|
49
|
+
line-height:1.2em;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part > .ck-button__label,
|
|
53
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part > .ck-slash-command-button__description{
|
|
54
|
+
width:var(--ck-slash-command-description-width);
|
|
55
|
+
overflow:hidden;
|
|
56
|
+
text-overflow:ellipsis;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part > .ck-button__label{
|
|
60
|
+
font-weight:bold;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part > .ck-slash-command-button__description{
|
|
64
|
+
font-size:var(--ck-font-size-small);
|
|
65
|
+
opacity:0.75;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button.ck-on > .ck-slash-command-button__text-part > span{
|
|
69
|
+
color:var(--ck-color-list-button-on-text);
|
|
70
|
+
}
|
package/dist/index.css
ADDED
|
@@ -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
|
+
* What you're currently looking at is the source code of a legally protected, proprietary software.
|
|
7
|
+
* CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,
|
|
8
|
+
* all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
11
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
16
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
:root {
|
|
20
|
+
--ck-slash-command-button-width: 250px;
|
|
21
|
+
--ck-slash-command-description-width: 200px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button {
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: flex-start;
|
|
27
|
+
width: var(--ck-slash-command-button-width);
|
|
28
|
+
padding: calc(.2 * var(--ck-line-height-base) * var(--ck-font-size-base));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button .ck.ck-icon {
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
margin-left: 0;
|
|
34
|
+
padding: 5px;
|
|
35
|
+
color: var(--ck-color-base-text);
|
|
36
|
+
background-color: var(--ck-color-base-background);
|
|
37
|
+
border-radius: 2px;
|
|
38
|
+
box-sizing: initial;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[dir="ltr"] .ck-mentions .ck.ck-button.ck-slash-command-button .ck.ck-icon {
|
|
42
|
+
margin: 0 var(--ck-spacing-small) 0 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[dir="rtl"] .ck-mentions .ck.ck-button.ck-slash-command-button .ck.ck-icon {
|
|
46
|
+
margin: 0 0 0 var(--ck-spacing-small);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[dir="ltr"] .ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part {
|
|
55
|
+
margin-left: var(--ck-spacing-small);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[dir="rtl"] .ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part {
|
|
59
|
+
margin-right: var(--ck-spacing-small);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part > span {
|
|
63
|
+
line-height: 1.2em;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part > .ck-button__label,
|
|
67
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part > .ck-slash-command-button__description {
|
|
68
|
+
width: var(--ck-slash-command-description-width);
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part > .ck-button__label {
|
|
74
|
+
font-weight: bold;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button > .ck-slash-command-button__text-part > .ck-slash-command-button__description {
|
|
78
|
+
font-size: var(--ck-font-size-small);
|
|
79
|
+
opacity: 0.75;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ck-mentions .ck.ck-button.ck-slash-command-button.ck-on > .ck-slash-command-button__text-part > span {
|
|
83
|
+
color: var(--ck-color-list-button-on-text);
|
|
84
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
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 slash-command
|
|
11
|
+
*/
|
|
12
|
+
export { default as SlashCommand } from './slashcommand.js';
|
|
13
|
+
export { default as SlashCommandConfig } from './slashcommandconfig.js';
|
|
14
|
+
export { default as SlashCommandEditing } from './slashcommandediting.js';
|
|
15
|
+
export { default as SlashCommandUI } from './slashcommandui.js';
|
|
16
|
+
export { type SlashCommandEditorConfig } from './slashcommandeditorconfig.js';
|
|
17
|
+
import './augmentation.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
import{Plugin as _0x1fef74,icons as _0x271340}from'@ckeditor/ckeditor5-core/dist/index.js';import{icons as _0x46fe80}from'ckeditor5-collaboration/dist/index.js';import{CKEditorError as _0x58e3cc,uid as _0x2ccc7c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ButtonView as _0xff4427,View as _0x4d5e80}from'@ckeditor/ckeditor5-ui/dist/index.js';class l extends _0x1fef74{static get['pluginName'](){return'SlashCommandConfig';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4de0e9){super(_0x4de0e9),this['_allowedCommands']=null;}['afterInit'](){const _0x240cae=this['editor']['config']['get']('slashCommand.removeCommands')||[],_0x148df1=function(_0x122dd8){let _0x89199f=['heading4','heading5','heading6'];if(_0x122dd8){const _0x1e9e3a=_0x122dd8['map'](_0x4631d4=>_0x4631d4['model']);_0x89199f=['heading1','heading2','heading3','heading4','heading5','heading6']['filter'](_0x1e8f1c=>!_0x1e9e3a['includes'](_0x1e8f1c));}return _0x89199f;}(this['editor']['config']['get']('heading.options'));let _0x122b8e=this['getDefaultCommands']()['filter'](_0x4946d8=>!_0x148df1['includes'](_0x4946d8['id']))['filter'](_0x262644=>!_0x240cae['includes'](_0x262644['commandName']));const _0xf0caa4=this['editor']['config']['get']('slashCommand.extraCommands');_0xf0caa4&&_0xf0caa4['length']&&(_0x122b8e=_0x122b8e['concat'](_0xf0caa4));const _0x54291c=this['editor']['config']['get']('template.definitions');_0x54291c&&_0x54291c['length']&&(_0x122b8e=_0x122b8e['concat'](function(_0x362936){return _0x362936['map'](_0x3d7086=>{const {title:_0xc7e8a9,icon:_0x51094d,description:_0x4dd06d,data:_0x18345c}=_0x3d7086,_0x197fb2={'id':u(_0xc7e8a9,'template'),'commandName':'insertTemplate','execute':_0x271f16=>{_0x271f16['execute']('insertTemplate',_0x18345c);},'description':_0x4dd06d,'icon':_0x51094d,'title':_0xc7e8a9};return _0x51094d&&(_0x197fb2['isIconColorInherited']=!0x1),_0x197fb2;});}(_0x54291c)));const _0x43e8b8=this['editor']['config']['get']('style.definitions');_0x43e8b8&&_0x43e8b8['length']&&(_0x122b8e=_0x122b8e['concat'](function(_0x375c8b){return _0x375c8b['map'](_0x3a7e0f=>({'id':u(_0x3a7e0f['name'],'style'),'commandName':'style','execute':_0x2c6d1e=>{_0x2c6d1e['execute']('style',{'styleName':_0x3a7e0f['name']});},'isEnabled':_0x4de93d=>{const _0x14aae1=_0x4de93d['commands']['get']('style');return _0x14aae1['isEnabled']&&_0x14aae1['enabledStyles']['includes'](_0x3a7e0f['name']);},'title':_0x3a7e0f['name']}));}(_0x43e8b8)));const _0x4ab7af=_0x122b8e['filter'](_0x2a3551=>!_0x2a3551['commandName']||void 0x0!==this['editor']['commands']['get'](_0x2a3551['commandName'])),_0x596b67=[];for(const _0x240913 of _0x4ab7af)_0x596b67['push']({'id':_0x240913['id'],'commandName':_0x240913['commandName'],'title':'function'==typeof _0x240913['title']?_0x240913['title'](this['editor']):_0x240913['title'],'description':_0x240913['description'],'icon':_0x240913['icon'],'isIconColorInherited':_0x240913['isIconColorInherited'],'aliases':_0x240913['aliases'],'isEnabled':()=>this['_proxyIsEnabled'](_0x240913),'execute':()=>this['_proxyExecute'](_0x240913)});this['_allowedCommands']=_0x596b67['sort'](m),async function(_0x5c0a12){const _0x21c70c=_0x43ab5a([0x71,0x53,0x72,0x7a,0x57,0x79,0x5a,0x33,0x46,0x68,0x36,0x77,0x45,0x6f,0x78,0x55,0x6d,0x35,0x4b,0x62,0x37,0x75,0x4c,0x76,0x32,0x34,0x30,0x42,0x66,0x63,0x6b,0x52,0x51,0x31,0x38,0x4a,0x61,0x58,0x59,0x41,0x6e,0x74,0x65,0x50,0x70,0x56,0x43,0x6a,0x54,0x67,0x6c,0x4f,0x47,0x49,0x44,0x39,0x64,0x73,0x4d,0x48,0x69,0x4e]),_0x34e105=0x28f7c9c8,_0x150b4f=0x28f09df0^_0x34e105,_0x27dea3=window[_0x43ab5a([0x44,0x61,0x74,0x65])][_0x43ab5a([0x6e,0x6f,0x77])](),_0x2d2c3f=_0x5c0a12[_0x43ab5a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x350f18=new window[(_0x43ab5a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x19f58c=>{_0x2d2c3f[_0x43ab5a([0x6f,0x6e,0x63,0x65])](_0x43ab5a([0x72,0x65,0x61,0x64,0x79]),_0x19f58c);}),_0xe3cbfa={[_0x43ab5a([0x6b,0x74,0x79])]:_0x43ab5a([0x45,0x43]),[_0x43ab5a([0x75,0x73,0x65])]:_0x43ab5a([0x73,0x69,0x67]),[_0x43ab5a([0x63,0x72,0x76])]:_0x43ab5a([0x50,0x2d,0x32,0x35,0x36]),[_0x43ab5a([0x78])]:_0x43ab5a([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x43ab5a([0x79])]:_0x43ab5a([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x43ab5a([0x61,0x6c,0x67])]:_0x43ab5a([0x45,0x53,0x32,0x35,0x36])},_0xe043de=_0x2d2c3f[_0x43ab5a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x43ab5a([0x67,0x65,0x74])](_0x43ab5a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x179800(){let _0x42c3fa,_0x1d5442=null,_0x3464b5=null;try{if(_0xe043de==_0x43ab5a([0x47,0x50,0x4c]))return _0x43ab5a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x42c3fa=_0x154e3b(),!_0x42c3fa)return _0x43ab5a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x42c3fa[_0x43ab5a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3464b5=_0x3055cd(_0x42c3fa[_0x43ab5a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x42c3fa[_0x43ab5a([0x6a,0x74,0x69])])),await _0x5787fc()?_0x3e6de8()?_0x1f096b()?_0x43ab5a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x42c498()?(_0x42c3fa[_0x43ab5a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x43ab5a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1d5442=_0x470dc7(_0x43ab5a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x42c3fa[_0x43ab5a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x43ab5a([0x74,0x72,0x69,0x61,0x6c])&&(_0x1d5442=_0x470dc7(_0x43ab5a([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0x42c3fa[_0x43ab5a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x43ab5a([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0x1d5442=_0x470dc7(_0x43ab5a([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3f177()):_0x43ab5a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x43ab5a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x43ab5a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x538e5d){return _0x43ab5a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1f096b(){const _0x259bb7=[_0x43ab5a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x43ab5a([0x74,0x72,0x69,0x61,0x6c])][_0x43ab5a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42c3fa[_0x43ab5a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x27dea3/0x3e8:0xe10*_0x150b4f;return _0x42c3fa[_0x43ab5a([0x65,0x78,0x70])]<_0x259bb7;}function _0x3e6de8(){const _0x466e7d=_0x42c3fa[_0x43ab5a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x466e7d&&(!!_0x466e7d[_0x43ab5a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43ab5a([0x2a]))||(!!_0x466e7d[_0x43ab5a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43ab5a([0x53,0x43]))||!!_0x466e7d[_0x43ab5a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43ab5a([0x50,0x50]))));}function _0x42c498(){const _0x1fd93f=_0x42c3fa[_0x43ab5a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1fd93f||0x0==_0x1fd93f[_0x43ab5a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x549b20}=new URL(window[_0x43ab5a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1fd93f[_0x43ab5a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x549b20))return!0x0;const _0x4eb566=_0x549b20[_0x43ab5a([0x73,0x70,0x6c,0x69,0x74])](_0x43ab5a([0x2e]));return _0x1fd93f[_0x43ab5a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x529f14=>_0x529f14[_0x43ab5a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x43ab5a([0x2a])))[_0x43ab5a([0x6d,0x61,0x70])](_0x4f2d9f=>_0x4f2d9f[_0x43ab5a([0x73,0x70,0x6c,0x69,0x74])](_0x43ab5a([0x2e])))[_0x43ab5a([0x73,0x6f,0x6d,0x65])](_0x3a3fe5=>_0x4eb566[_0x43ab5a([0x65,0x76,0x65,0x72,0x79])]((_0x325e32,_0x49937a)=>_0x3a3fe5[_0x49937a]===_0x325e32||_0x3a3fe5[_0x49937a]===_0x43ab5a([0x2a])));}function _0x3f177(){return _0x1d5442&&_0x3464b5?new window[(_0x43ab5a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x45c254,_0x4b8ff7)=>{_0x1d5442[_0x43ab5a([0x74,0x68,0x65,0x6e])](_0x45c254,_0x4b8ff7),_0x3464b5[_0x43ab5a([0x74,0x68,0x65,0x6e])](_0x24360b=>{_0x24360b!=_0x43ab5a([0x56,0x61,0x6c,0x69,0x64])&&_0x45c254(_0x24360b);},_0x4b8ff7);}):_0x1d5442||_0x3464b5||_0x43ab5a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3055cd(_0x194d8d,_0x2a032c){return new window[(_0x43ab5a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21b9f3=>{if(_0x53938a())return _0x21b9f3(_0x43ab5a([0x56,0x61,0x6c,0x69,0x64]));_0x2c27f9(),_0x2d2c3f[_0x43ab5a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x43ab5a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xef4683=!0x1;const _0x16a1f0=_0x2ccc7c();function _0xc1539a(_0x3126b9){_0x2416b3(_0x3126b9)[_0x43ab5a([0x74,0x68,0x65,0x6e])](_0x2e411d=>{if(!_0x2e411d||_0x2e411d[_0x43ab5a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x43ab5a([0x6f,0x6b]))return _0x43ab5a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x591461(_0xe4eb4d(_0x16a1f0+_0x2a032c))!=_0x2e411d[_0x43ab5a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x43ab5a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x43ab5a([0x56,0x61,0x6c,0x69,0x64]);})[_0x43ab5a([0x74,0x68,0x65,0x6e])](_0x401f9e=>(_0x36fc8c(),_0x401f9e),()=>{const _0x4d6040=_0x25b2f5();return null==_0x4d6040?(_0x36fc8c(),_0x43ab5a([0x56,0x61,0x6c,0x69,0x64])):_0x43ab5a(_0x27dea3-_0x4d6040>(0xcfb4dc8^_0x34e105)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x43ab5a([0x74,0x68,0x65,0x6e])](_0x21b9f3)[_0x43ab5a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x21b9f3(_0x43ab5a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x32e1e9=0x28c12748^_0x34e105;function _0x36fc8c(){const _0x1a9cc8=_0x43ab5a([0x6c,0x6c,0x63,0x74,0x2d])+_0x591461(_0xe4eb4d(_0x194d8d)),_0x4ca53f=_0x51c037(_0x591461(window[_0x43ab5a([0x4d,0x61,0x74,0x68])][_0x43ab5a([0x63,0x65,0x69,0x6c])](_0x27dea3/_0x32e1e9)));window[_0x43ab5a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x43ab5a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1a9cc8,_0x4ca53f);}function _0x25b2f5(){const _0x35249f=_0x43ab5a([0x6c,0x6c,0x63,0x74,0x2d])+_0x591461(_0xe4eb4d(_0x194d8d)),_0x3de24d=window[_0x43ab5a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x43ab5a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35249f);return _0x3de24d?window[_0x43ab5a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x51c037(_0x3de24d),0x10)*_0x32e1e9:null;}function _0x2416b3(_0x5194d2){return new window[(_0x43ab5a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4a72ff,_0x441186)=>{_0x5194d2[_0x43ab5a([0x74,0x68,0x65,0x6e])](_0x4a72ff,_0x441186),window[_0x43ab5a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x441186,0x28f61d08^_0x34e105);});}}_0x2d2c3f[_0x43ab5a([0x6f,0x6e])](_0x43ab5a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3e3e17,_0x95064d)=>{if(_0x95064d[0x0]!=_0x194d8d)return _0x21b9f3(_0x43ab5a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x95064d[0x1]={..._0x95064d[0x1],[_0x43ab5a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x16a1f0};},{[_0x43ab5a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x43ab5a([0x68,0x69,0x67,0x68])}),_0x2d2c3f[_0x43ab5a([0x6f,0x6e])](_0x43ab5a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xf74ddf=>{_0xf74ddf[_0x43ab5a([0x72,0x65,0x74,0x75,0x72,0x6e])]instanceof window[_0x43ab5a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])]&&(_0xef4683=!0x0,_0xc1539a(_0xf74ddf[_0x43ab5a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x43ab5a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x43ab5a([0x6c,0x6f,0x77])}),_0x350f18[_0x43ab5a([0x74,0x68,0x65,0x6e])](()=>{_0xef4683||_0x21b9f3(_0x43ab5a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x53938a(){return _0x2d2c3f[_0x43ab5a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x43ab5a([0x76,0x69,0x65,0x77])][_0x43ab5a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x43ab5a([0x61,0x75,0x74,0x6f]);}function _0x2c27f9(){_0x2d2c3f[_0x43ab5a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x43ab5a([0x76,0x69,0x65,0x77])][_0x43ab5a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x43ab5a([0x61,0x75,0x74,0x6f]);}}function _0x470dc7(_0x1b5e5b){const _0x25e88d=[new window[(_0x43ab5a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d9d6b=>setTimeout(_0x4d9d6b,0x28fef704^_0x34e105)),_0x350f18[_0x43ab5a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x43ab5a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x19fb8d=>{let _0x2475d3=0x0;_0x2d2c3f[_0x43ab5a([0x6d,0x6f,0x64,0x65,0x6c])][_0x43ab5a([0x6f,0x6e])](_0x43ab5a([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3e58b2,_0x96a1d3)=>{_0x96a1d3[0x0][_0x43ab5a([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2475d3++,_0x2475d3==(0x28f7c830^_0x34e105)&&(_0x19fb8d(),_0x3e58b2[_0x43ab5a([0x6f,0x66,0x66])]());});}))];return window[_0x43ab5a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x43ab5a([0x72,0x61,0x63,0x65])](_0x25e88d)[_0x43ab5a([0x74,0x68,0x65,0x6e])](()=>_0x1b5e5b);}async function _0x25887e(){await _0x350f18,_0x2d2c3f[_0x43ab5a([0x6d,0x6f,0x64,0x65,0x6c])][_0x43ab5a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x31a48d,_0x2d2c3f[_0x43ab5a([0x6d,0x6f,0x64,0x65,0x6c])][_0x43ab5a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x31a48d,_0x2d2c3f[_0x43ab5a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x43ab5a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2e114e(_0x404e8f){const _0x2eabfb=_0x4c8ed9();_0x2d2c3f[_0x2eabfb]=_0x43ab5a([0x73,0x6c,0x61,0x73,0x68,0x43,0x6f,0x6d,0x6d,0x61,0x6e,0x64,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x404e8f,_0x404e8f!=_0x43ab5a([0x56,0x61,0x6c,0x69,0x64])&&_0x25887e();}function _0x4c8ed9(){const _0x1c1da9=window[_0x43ab5a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x43ab5a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x43ab5a([0x6e,0x6f,0x77])]())[_0x43ab5a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x43ab5a([0x2e]),'');let _0x192927=_0x43ab5a([0x71]);for(let _0x181c2a=0x0;_0x181c2a<_0x1c1da9[_0x43ab5a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x181c2a+=0x2){let _0xdc569a=window[_0x43ab5a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1c1da9[_0x43ab5a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x181c2a,_0x181c2a+0x2));_0xdc569a>=_0x21c70c[_0x43ab5a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xdc569a-=_0x21c70c[_0x43ab5a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x192927+=_0x21c70c[_0xdc569a];}return _0x192927;}function _0x154e3b(){const _0x10bd27=_0xe043de[_0x43ab5a([0x73,0x70,0x6c,0x69,0x74])](_0x43ab5a([0x2e]));if(0x3!=_0x10bd27[_0x43ab5a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x349642(_0x10bd27[0x1]);function _0x349642(_0x81885a){const _0x502929=_0x41a650(_0x81885a);return _0x502929&&_0x512383()?_0x502929:null;function _0x512383(){const _0x5afc32=_0x502929[_0x43ab5a([0x6a,0x74,0x69])],_0x4eb2fb=window[_0x43ab5a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5afc32[_0x43ab5a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5afc32[_0x43ab5a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5302d4={..._0x502929,[_0x43ab5a([0x6a,0x74,0x69])]:_0x5afc32[_0x43ab5a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5afc32[_0x43ab5a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5302d4[_0x43ab5a([0x76,0x63])],_0xe4eb4d(_0x5302d4)==_0x4eb2fb;}}}async function _0x5787fc(){let _0x250373=!0x0;try{const _0x101a13=_0xe043de[_0x43ab5a([0x73,0x70,0x6c,0x69,0x74])](_0x43ab5a([0x2e])),[_0x36743c,_0x35f760,_0x53bc87]=_0x101a13;return _0x3c8ead(_0x36743c),await _0x24b186(_0x36743c,_0x35f760,_0x53bc87),_0x250373;}catch(_0x287ca4){return!0x1;}function _0x3c8ead(_0x3073ff){const _0xc4a83f=_0x41a650(_0x3073ff);_0xc4a83f&&_0xc4a83f[_0x43ab5a([0x61,0x6c,0x67])]==_0x43ab5a([0x45,0x53,0x32,0x35,0x36])||(_0x250373=!0x1);}async function _0x24b186(_0x56f584,_0x2dcd36,_0x2eb049){const _0x3b2f41=window[_0x43ab5a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x43ab5a([0x66,0x72,0x6f,0x6d])](_0x58e8f5(_0x2eb049),_0x14faeb=>_0x14faeb[_0x43ab5a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1fc234=new window[(_0x43ab5a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x43ab5a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x56f584+_0x43ab5a([0x2e])+_0x2dcd36),_0x2da6b7=window[_0x43ab5a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x43ab5a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2da6b7)return;const _0x54d0bf=await _0x2da6b7[_0x43ab5a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x43ab5a([0x6a,0x77,0x6b]),_0xe3cbfa,{[_0x43ab5a([0x6e,0x61,0x6d,0x65])]:_0x43ab5a([0x45,0x43,0x44,0x53,0x41]),[_0x43ab5a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x43ab5a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x43ab5a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2da6b7[_0x43ab5a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x43ab5a([0x6e,0x61,0x6d,0x65])]:_0x43ab5a([0x45,0x43,0x44,0x53,0x41]),[_0x43ab5a([0x68,0x61,0x73,0x68])]:{[_0x43ab5a([0x6e,0x61,0x6d,0x65])]:_0x43ab5a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x54d0bf,_0x3b2f41,_0x1fc234)||(_0x250373=!0x1);}}function _0x41a650(_0x5b444b){return _0x5b444b[_0x43ab5a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x43ab5a([0x65,0x79]))?JSON[_0x43ab5a([0x70,0x61,0x72,0x73,0x65])](_0x58e8f5(_0x5b444b)):null;}function _0x58e8f5(_0x39d964){return window[_0x43ab5a([0x61,0x74,0x6f,0x62])](_0x39d964[_0x43ab5a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x43ab5a([0x2b]))[_0x43ab5a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x43ab5a([0x2f])));}function _0xe4eb4d(_0x89ae7f){let _0x516108=0x1505;function _0x24ac94(_0x36988e){for(let _0x275cd5=0x0;_0x275cd5<_0x36988e[_0x43ab5a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x275cd5++){const _0x2e4554=_0x36988e[_0x43ab5a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x275cd5);_0x516108=(_0x516108<<0x5)+_0x516108+_0x2e4554,_0x516108&=_0x516108;}}function _0x5b0389(_0x5f5684){Array[_0x43ab5a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5f5684)?_0x5f5684[_0x43ab5a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5b0389):_0x5f5684&&typeof _0x5f5684==_0x43ab5a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x43ab5a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5f5684)[_0x43ab5a([0x73,0x6f,0x72,0x74])]()[_0x43ab5a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4efb6f,_0x34ac33])=>{_0x24ac94(_0x4efb6f),_0x5b0389(_0x34ac33);}):_0x24ac94(window[_0x43ab5a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5f5684));}return _0x5b0389(_0x89ae7f),_0x516108>>>0x0;}function _0x591461(_0x61eeba){return _0x61eeba[_0x43ab5a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x43ab5a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x43ab5a([0x30]));}function _0x51c037(_0x2d895b){return _0x2d895b[_0x43ab5a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x43ab5a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x43ab5a([0x6a,0x6f,0x69,0x6e])]('');}function _0x31a48d(){}function _0x43ab5a(_0x459b70){return _0x459b70['map'](_0xc3b0a5=>String['fromCharCode'](_0xc3b0a5))['join']('');}_0x2e114e(await _0x179800());}(this);}['getAllowedCommands'](){return this['_allowedCommands'];}['getDefaultCommands'](){const _0x3ce911=_0x6cd74f=>function(_0x269e4c,_0x141831){const t=_0x269e4c['t'],_0x49234c=_0x269e4c['t'];switch(_0x141831){case'AI\x20Assistant':return _0x49234c('AI\x20Assistant');case'Block\x20quote':return _0x49234c('Block\x20quote');case'Bulleted\x20list':return _0x49234c('Bulleted\x20list');case'Insert\x20code\x20block':return _0x49234c('Insert\x20code\x20block');case'Open\x20file\x20manager':return _0x49234c('Open\x20file\x20manager');case'Insert\x20image':return _0x49234c('Insert\x20image');case'Heading\x201':return _0x49234c('Heading\x201');case'Heading\x202':return _0x49234c('Heading\x202');case'Heading\x203':return _0x49234c('Heading\x203');case'Heading\x204':return _0x49234c('Heading\x204');case'Heading\x205':return _0x49234c('Heading\x205');case'Heading\x206':return _0x49234c('Heading\x206');case'Horizontal\x20line':return _0x49234c('Horizontal\x20line');case'Insert\x20HTML':return _0x49234c('Insert\x20HTML');case'Increase\x20indent':return _0x49234c('Increase\x20indent');case'Insert\x20table':return _0x49234c('Insert\x20table');case'Table\x20of\x20contents':return _0x49234c('Table\x20of\x20contents');case'Numbered\x20list':return _0x49234c('Numbered\x20list');case'Decrease\x20indent':return _0x49234c('Decrease\x20indent');case'Paragraph':return _0x49234c('Paragraph');case'To-do\x20list':return _0x49234c('To-do\x20list');case'Create\x20a\x20block\x20quote':return t('Create\x20a\x20block\x20quote');case'Create\x20a\x20bulleted\x20list':return t('Create\x20a\x20bulleted\x20list');case'Create\x20a\x20code\x20block':return t('Create\x20a\x20code\x20block');case'Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file':return t('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file');case'Create\x20a\x20heading\x20level\x201':return t('Create\x20a\x20heading\x20level\x201');case'Create\x20a\x20heading\x20level\x202':return t('Create\x20a\x20heading\x20level\x202');case'Create\x20a\x20heading\x20level\x203':return t('Create\x20a\x20heading\x20level\x203');case'Create\x20a\x20heading\x20level\x204':return t('Create\x20a\x20heading\x20level\x204');case'Create\x20a\x20heading\x20level\x205':return t('Create\x20a\x20heading\x20level\x205');case'Create\x20a\x20heading\x20level\x206':return t('Create\x20a\x20heading\x20level\x206');case'Insert\x20a\x20horizontal\x20line':return t('Insert\x20a\x20horizontal\x20line');case'Insert\x20an\x20HTML\x20snippet':return t('Insert\x20an\x20HTML\x20snippet');case'Increase\x20the\x20indentation':return t('Increase\x20the\x20indentation');case'Insert\x20Mermaid\x20diagram':return t('Insert\x20Mermaid\x20diagram');case'Insert\x20the\x20Mermaid\x20diagram':return t('Insert\x20the\x20Mermaid\x20diagram');case'Create\x20a\x20table':return t('Create\x20a\x20table');case'Insert\x20table\x20of\x20contents':return t('Insert\x20table\x20of\x20contents');case'Create\x20a\x20numbered\x20list':return t('Create\x20a\x20numbered\x20list');case'Decrease\x20the\x20indentation':return t('Decrease\x20the\x20indentation');case'Insert\x20a\x20paragraph':return t('Insert\x20a\x20paragraph');case'Create\x20a\x20to-do\x20list':return t('Create\x20a\x20to-do\x20list');case'Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content':return t('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content');default:return _0x141831;}}(this['editor']['locale'],_0x6cd74f);return[{'id':'aiAssistant','commandName':'showAIAssistant','icon':_0x46fe80['robotPencil'],'title':_0x3ce911('AI\x20Assistant'),'description':_0x3ce911('Open\x20the\x20AI\x20Assistant\x20to\x20generate\x20content'),'execute':_0x595cea=>{setTimeout(()=>_0x595cea['execute']('showAIAssistant'));}},{'id':'blockQuote','commandName':'blockQuote','icon':_0x271340['quote'],'title':_0x3ce911('Block\x20quote'),'description':_0x3ce911('Create\x20a\x20block\x20quote')},{'id':'bulletedList','commandName':'bulletedList','icon':_0x271340['bulletedList'],'title':_0x3ce911('Bulleted\x20list'),'description':_0x3ce911('Create\x20a\x20bulleted\x20list')},{'id':'codeBlock','commandName':'codeBlock','icon':_0x271340['codeBlock'],'title':_0x3ce911('Insert\x20code\x20block'),'description':_0x3ce911('Create\x20a\x20code\x20block')},{'id':'ckbox','commandName':'ckbox','icon':_0x271340['browseFiles'],'title':_0x3ce911('Open\x20file\x20manager'),'description':_0x3ce911('Open\x20file\x20manager\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckfinder','filemanager','upload']},{'id':'ckfinder','commandName':'ckfinder','icon':_0x271340['browseFiles'],'title':_0x3ce911('Insert\x20image'),'description':_0x3ce911('Open\x20file\x20browser\x20to\x20insert\x20an\x20image\x20or\x20a\x20file'),'aliases':['ckbox','filemanager','upload']},{'id':'heading1','commandName':'heading','icon':_0x271340['heading1'],'title':_0x3ce911('Heading\x201'),'description':_0x3ce911('Create\x20a\x20heading\x20level\x201'),'execute':_0x134396=>{_0x134396['execute']('heading',{'value':'heading1'});}},{'id':'heading2','commandName':'heading','icon':_0x271340['heading2'],'title':_0x3ce911('Heading\x202'),'description':_0x3ce911('Create\x20a\x20heading\x20level\x202'),'execute':_0x328fb7=>{_0x328fb7['execute']('heading',{'value':'heading2'});}},{'id':'heading3','commandName':'heading','icon':_0x271340['heading3'],'title':_0x3ce911('Heading\x203'),'description':_0x3ce911('Create\x20a\x20heading\x20level\x203'),'execute':_0x38c180=>{_0x38c180['execute']('heading',{'value':'heading3'});}},{'id':'heading4','commandName':'heading','icon':_0x271340['heading4'],'title':_0x3ce911('Heading\x204'),'description':_0x3ce911('Create\x20a\x20heading\x20level\x204'),'execute':_0x1c7372=>{_0x1c7372['execute']('heading',{'value':'heading4'});}},{'id':'heading5','commandName':'heading','icon':_0x271340['heading5'],'title':_0x3ce911('Heading\x205'),'description':_0x3ce911('Create\x20a\x20heading\x20level\x205'),'execute':_0x29711c=>{_0x29711c['execute']('heading',{'value':'heading5'});}},{'id':'heading6','commandName':'heading','icon':_0x271340['heading6'],'title':_0x3ce911('Heading\x206'),'description':_0x3ce911('Create\x20a\x20heading\x20level\x206'),'execute':_0x18f32d=>{_0x18f32d['execute']('heading',{'value':'heading6'});}},{'id':'horizontalLine','commandName':'horizontalLine','icon':_0x271340['horizontalLine'],'title':_0x3ce911('Horizontal\x20line'),'description':_0x3ce911('Insert\x20a\x20horizontal\x20line')},{'id':'htmlEmbed','commandName':'htmlEmbed','icon':_0x271340['html'],'title':_0x3ce911('Insert\x20HTML'),'description':_0x3ce911('Insert\x20an\x20HTML\x20snippet')},{'id':'indent','commandName':'indent','icon':_0x271340['indent'],'title':_0x3ce911('Increase\x20indent'),'description':_0x3ce911('Increase\x20the\x20indentation')},{'id':'insertMermaidCommand','commandName':'insertMermaidCommand','title':_0x3ce911('Insert\x20Mermaid\x20diagram'),'description':_0x3ce911('Insert\x20the\x20Mermaid\x20diagram')},{'id':'insertTable','commandName':'insertTable','icon':_0x271340['table'],'title':_0x3ce911('Insert\x20table'),'description':_0x3ce911('Create\x20a\x20table')},{'id':'insertTableOfContents','commandName':'insertTableOfContents','icon':_0x46fe80['tableOfContents'],'title':_0x3ce911('Table\x20of\x20contents'),'description':_0x3ce911('Insert\x20table\x20of\x20contents'),'aliases':['toc']},{'id':'numberedList','commandName':'numberedList','icon':_0x271340['numberedList'],'title':_0x3ce911('Numbered\x20list'),'description':_0x3ce911('Create\x20a\x20numbered\x20list')},{'id':'outdent','commandName':'outdent','icon':_0x271340['outdent'],'title':_0x3ce911('Decrease\x20indent'),'description':_0x3ce911('Decrease\x20the\x20indentation')},{'id':'paragraph','commandName':'paragraph','icon':_0x271340['paragraph'],'title':_0x3ce911('Paragraph'),'description':_0x3ce911('Insert\x20a\x20paragraph')},{'id':'todoList','commandName':'todoList','icon':_0x271340['todoList'],'title':_0x3ce911('To-do\x20list'),'description':_0x3ce911('Create\x20a\x20to-do\x20list')}];}['_proxyIsEnabled'](_0x475d8b){return _0x475d8b['isEnabled']?_0x475d8b['isEnabled'](this['editor']):!_0x475d8b['commandName']||this['editor']['commands']['get'](_0x475d8b['commandName'])['isEnabled'];}['_proxyExecute'](_0x3dd417){if(_0x3dd417['execute'])_0x3dd417['execute'](this['editor']);else{if(!_0x3dd417['commandName'])throw new _0x58e3cc('slash-command-execute-missing',this['editor'],{'commandDefinition':_0x3dd417});this['editor']['execute'](_0x3dd417['commandName']);}}}function m(_0x46de77,_0x4ee583){return _0x46de77['title']<_0x4ee583['title']?-0x1:_0x46de77['title']>_0x4ee583['title']?0x1:0x0;}function u(_0x1d0c0b,_0x90b22e){return _0x90b22e+'-'+_0x1d0c0b['toLowerCase']()['split']('\x20')['join']('-');}class r extends _0x1fef74{static get['pluginName'](){return'SlashCommandEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['getMatchingCommands'](_0x35a244){const _0x1eeef3=_0x35a244&&_0x35a244['toLowerCase']();let _0x26e6cf=this['editor']['plugins']['get']('SlashCommandConfig')['getAllowedCommands']();if(_0x26e6cf=_0x26e6cf['filter'](_0x1ddd11=>_0x1ddd11['isEnabled']()),_0x1eeef3){const _0x3ea35b=[],_0x123bb6=[],_0x5ca805=[],_0x1726c2=[];for(const _0x5ea702 of _0x26e6cf)_0x5ea702['id']['toLowerCase']()['includes'](_0x1eeef3)?_0x3ea35b['push'](_0x5ea702):_0x5ea702['title']['toLowerCase']()['includes'](_0x1eeef3)?_0x123bb6['push'](_0x5ea702):_0x5ea702['aliases']&&_0x5ea702['aliases']['some'](_0x351a4e=>_0x351a4e['toLowerCase']()['includes'](_0x1eeef3))?_0x5ca805['push'](_0x5ea702):_0x5ea702['description']&&_0x5ea702['description']['toLowerCase']()['includes'](_0x1eeef3)&&_0x1726c2['push'](_0x5ea702);_0x26e6cf=_0x3ea35b['concat'](_0x123bb6,_0x5ca805,_0x1726c2);}return _0x26e6cf;}}class h extends _0xff4427{constructor(_0x426248,_0x1e7f23){super(_0x426248),this['textPartView']=this['_createTextPartView'](_0x426248,_0x1e7f23),void 0x0!==_0x1e7f23['isIconColorInherited']&&(this['iconView']['isColorInherited']=_0x1e7f23['isIconColorInherited']),this['set']({'icon':_0x1e7f23['icon']||'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M10\x2019a9\x209\x200\x201\x200\x200-18\x209\x209\x200\x200\x200\x200\x2018Zm3.45-9.872a1\x201\x200\x200\x201\x200\x201.744l-4.96\x202.79A1\x201\x200\x200\x201\x207\x2012.79V7.21a1\x201\x200\x200\x201\x201.49-.872l4.96\x202.79Z\x22/></svg>','withText':!0x0,'label':_0x1e7f23['title'],'class':'ck-slash-command-button'});}['render'](){super['render'](),this['children']['add'](this['textPartView']);}['_createTextPartView'](_0x23b41e,_0x57f430){const _0x557a74=new _0x4d5e80(_0x23b41e);return _0x557a74['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-slash-command-button__text-part']},'children':_0x57f430['description']?[this['labelView'],{'tag':'span','attributes':{'class':['ck','ck-slash-command-button__description']},'children':[{'text':_0x57f430['description']}]}]:[this['labelView']]}),_0x557a74;}}class e extends _0x1fef74{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'SlashCommandUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x15385e){super(_0x15385e),this['_setupMentionConfiguration']();}['init'](){this['editor']['once']('ready',this['_overrideMentionExecuteListener']['bind'](this)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x71aed6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4ecd57;for(const _0x4fe062 in _0x71aed6){const _0x476ee1=_0x4fe062,_0x28fff4=_0x71aed6[_0x476ee1];if('slashCommandLicenseKeyValid'==_0x28fff4||'slashCommandLicenseKeyInvalid'==_0x28fff4||'slashCommandLicenseKeyExpired'==_0x28fff4||'slashCommandLicenseKeyDomainLimit'==_0x28fff4||'slashCommandLicenseKeyNotAllowed'==_0x28fff4||'slashCommandLicenseKeyEvaluationLimit'==_0x28fff4||'slashCommandLicenseKeyTrialLimit'==_0x28fff4||'slashCommandLicenseKeyDevelopmentLimit'==_0x28fff4||'slashCommandLicenseKeyUsageLimit'==_0x28fff4){delete _0x71aed6[_0x476ee1],_0x4ecd57=_0x28fff4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'slashCommandLicenseKeyInvalid'==_0x4ecd57&&_0x71aed6['_showLicenseError']('invalid'),'slashCommandLicenseKeyExpired'==_0x4ecd57&&_0x71aed6['_showLicenseError']('expired'),'slashCommandLicenseKeyDomainLimit'==_0x4ecd57&&_0x71aed6['_showLicenseError']('domainLimit'),'slashCommandLicenseKeyNotAllowed'==_0x4ecd57&&_0x71aed6['_showLicenseError']('featureNotAllowed','SlashCommand'),'slashCommandLicenseKeyEvaluationLimit'==_0x4ecd57&&_0x71aed6['_showLicenseError']('evaluationLimit'),'slashCommandLicenseKeyTrialLimit'==_0x4ecd57&&_0x71aed6['_showLicenseError']('trialLimit'),'slashCommandLicenseKeyDevelopmentLimit'==_0x4ecd57&&_0x71aed6['_showLicenseError']('developmentLimit'),'slashCommandLicenseKeyUsageLimit'==_0x4ecd57&&_0x71aed6['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_setupMentionConfiguration'](){const _0x4f32fa=this['editor'],_0x4a811c=this['editor']['plugins']['get']('SlashCommandEditing'),_0x2964fd=_0x4f32fa['config']['get']('mention.feeds');_0x2964fd['push']({'marker':'/','feed':_0x3c9fef=>_0x4a811c['getMatchingCommands'](_0x3c9fef),'itemRenderer':this['_customItemRenderer']['bind'](this),'dropdownLimit':_0x4f32fa['config']['get']('slashCommand.dropdownLimit')||0x1/0x0}),_0x4f32fa['config']['set']('mention.feeds',_0x2964fd);}['_overrideMentionExecuteListener'](){const _0x41bb1d=this['editor'];_0x41bb1d['commands']['get']('mention')['on']('execute',(_0x5b71f1,_0x345f3a)=>{const _0x4d84ba=_0x345f3a[0x0],_0x57b570=_0x41bb1d['model'];'/'===_0x4d84ba['marker']&&_0x57b570['change'](_0x2e975d=>{_0x2e975d['remove'](_0x4d84ba['range']),_0x4d84ba['mention']['execute'](),_0x5b71f1['stop']();});},{'priority':'high'});}['_customItemRenderer'](_0x31092a){const _0x1aa3fc=this['editor']['locale'],_0x497c6c=new h(_0x1aa3fc,_0x31092a);return _0x497c6c['render'](),_0x497c6c['element'];}}class s extends _0x1fef74{static get['requires'](){return['Mention',r,e];}static get['pluginName'](){return'SlashCommand';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{s as SlashCommand,l as SlashCommandConfig,r as SlashCommandEditing,e as SlashCommandUI};
|
|
@@ -0,0 +1,24 @@
|
|
|
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 slash-command/legacyerrors
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Invalid license key. Please contact our customer support at https://ckeditor.com/contact/.
|
|
15
|
+
*
|
|
16
|
+
* @error slash-command-invalid-license-key
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* You have exhausted the trial usage limit (reason: reached document changes limit). Restart the editor.
|
|
20
|
+
*
|
|
21
|
+
* Please contact our customer support to get a full access at https://ckeditor.com/contact/.
|
|
22
|
+
*
|
|
23
|
+
* @error slash-command-trial-license-key-reached-limit-changes
|
|
24
|
+
*/
|
|
@@ -0,0 +1,41 @@
|
|
|
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 slash-command/slashcommand
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
14
|
+
import SlashCommandEditing from './slashcommandediting.js';
|
|
15
|
+
import SlashCommandUI from './slashcommandui.js';
|
|
16
|
+
/**
|
|
17
|
+
* The slash command feature.
|
|
18
|
+
* It allows for an easy access to a predefined list of editor commands by typing `/` inside the editor.
|
|
19
|
+
*
|
|
20
|
+
* For a detailed overview, check the {@glink features/slash-commands Slash command} feature guide.
|
|
21
|
+
*
|
|
22
|
+
* @extends module:core/plugin~Plugin
|
|
23
|
+
*/
|
|
24
|
+
export default class SlashCommand extends Plugin {
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get requires(): readonly ["Mention", typeof SlashCommandEditing, typeof SlashCommandUI];
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
static get pluginName(): "SlashCommand";
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
static get isOfficialPlugin(): true;
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
static get isPremiumPlugin(): true;
|
|
41
|
+
}
|
|
@@ -0,0 +1,254 @@
|
|
|
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 slash-command/slashcommandconfig
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
14
|
+
import './slashcommandeditorconfig.js';
|
|
15
|
+
/**
|
|
16
|
+
* This plugin takes care of the configuration for {@link module:slash-command/slashcommand~SlashCommand}:
|
|
17
|
+
*
|
|
18
|
+
* * It manages the configuration of slash commands in the editor.
|
|
19
|
+
* * It provides default slash commands for common editor features.
|
|
20
|
+
* * It allows defining extra commands and reducing the list of defaults using the editor configuration.
|
|
21
|
+
* See {@link module:slash-command/slashcommandconfig~SlashCommandConfig} to learn more.
|
|
22
|
+
*
|
|
23
|
+
* @extends module:core/plugin~Plugin
|
|
24
|
+
*/
|
|
25
|
+
export default class SlashCommandConfig extends Plugin {
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName(): "SlashCommandConfig";
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
static get isOfficialPlugin(): true;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
static get isPremiumPlugin(): true;
|
|
38
|
+
/**
|
|
39
|
+
* @inheritDoc
|
|
40
|
+
*/
|
|
41
|
+
constructor(editor: Editor);
|
|
42
|
+
/**
|
|
43
|
+
* @inheritDoc
|
|
44
|
+
*/
|
|
45
|
+
afterInit(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Returns an array of slash command definitions enabled in the editor.
|
|
48
|
+
*
|
|
49
|
+
* This method takes into account the following:
|
|
50
|
+
* * The {@link module:slash-command/slashcommandconfig~SlashCommandConfig#getDefaultCommands list of default commands}.
|
|
51
|
+
* * The presence of {@link module:core/editor/editorconfig~EditorConfig#plugins editor features} (plugins).
|
|
52
|
+
* * The {@link module:slash-command/slashcommandeditorconfig~SlashCommandEditorConfig#removeCommands} configuration.
|
|
53
|
+
* * The {@link module:slash-command/slashcommandeditorconfig~SlashCommandEditorConfig#extraCommands} configuration.
|
|
54
|
+
*/
|
|
55
|
+
getAllowedCommands(): Array<SlashCommandDefinition>;
|
|
56
|
+
/**
|
|
57
|
+
* Returns a list of default slash command {@link module:slash-command/slashcommandconfig~SlashCommandDefinition definitions}
|
|
58
|
+
* for common editor features. The available definitions are as follows:
|
|
59
|
+
*
|
|
60
|
+
* ```js
|
|
61
|
+
* [
|
|
62
|
+
* {
|
|
63
|
+
* id: 'blockQuote',
|
|
64
|
+
* commandName: 'blockQuote',
|
|
65
|
+
* title: t( 'Block quote' ),
|
|
66
|
+
* // ...
|
|
67
|
+
* },
|
|
68
|
+
* {
|
|
69
|
+
* id: 'bulletedList',
|
|
70
|
+
* commandName: 'bulletedList',
|
|
71
|
+
* title: t( 'Bulleted list' ),
|
|
72
|
+
* // ...
|
|
73
|
+
* },
|
|
74
|
+
* {
|
|
75
|
+
* id: 'codeBlock',
|
|
76
|
+
* commandName: 'codeBlock',
|
|
77
|
+
* title: t( 'Insert code block' ),
|
|
78
|
+
* // ...
|
|
79
|
+
* },
|
|
80
|
+
* {
|
|
81
|
+
* id: 'ckbox',
|
|
82
|
+
* commandName: 'ckbox',
|
|
83
|
+
* title: t( 'Open file manager' ),
|
|
84
|
+
* // ...
|
|
85
|
+
* },
|
|
86
|
+
* {
|
|
87
|
+
* id: 'ckfinder',
|
|
88
|
+
* commandName: 'ckfinder',
|
|
89
|
+
* title: t( 'Insert image' ),
|
|
90
|
+
* // ...
|
|
91
|
+
* },
|
|
92
|
+
* {
|
|
93
|
+
* id: 'heading1',
|
|
94
|
+
* commandName: 'heading',
|
|
95
|
+
* title: t( 'Heading 1' ),
|
|
96
|
+
* // ...
|
|
97
|
+
* },
|
|
98
|
+
* {
|
|
99
|
+
* id: 'heading2',
|
|
100
|
+
* commandName: 'heading',
|
|
101
|
+
* title: t( 'Heading 2' ),
|
|
102
|
+
* // ...
|
|
103
|
+
* },
|
|
104
|
+
* {
|
|
105
|
+
* id: 'heading3',
|
|
106
|
+
* commandName: 'heading',
|
|
107
|
+
* title: t( 'Heading 3' ),
|
|
108
|
+
* // ...
|
|
109
|
+
* },
|
|
110
|
+
* {
|
|
111
|
+
* id: 'heading4',
|
|
112
|
+
* commandName: 'heading',
|
|
113
|
+
* title: t( 'Heading 4' ),
|
|
114
|
+
* // ...
|
|
115
|
+
* },
|
|
116
|
+
* {
|
|
117
|
+
* id: 'heading5',
|
|
118
|
+
* commandName: 'heading',
|
|
119
|
+
* title: t( 'Heading 5' ),
|
|
120
|
+
* // ...
|
|
121
|
+
* },
|
|
122
|
+
* {
|
|
123
|
+
* id: 'heading6',
|
|
124
|
+
* commandName: 'heading',
|
|
125
|
+
* title: t( 'Heading 6' ),
|
|
126
|
+
* // ...
|
|
127
|
+
* },
|
|
128
|
+
* {
|
|
129
|
+
* id: 'horizontalLine',
|
|
130
|
+
* commandName: 'horizontalLine',
|
|
131
|
+
* title: t( 'Horizontal line' ),
|
|
132
|
+
* // ...
|
|
133
|
+
* },
|
|
134
|
+
* {
|
|
135
|
+
* id: 'htmlEmbed',
|
|
136
|
+
* commandName: 'htmlEmbed',
|
|
137
|
+
* title: t( 'Insert HTML' ),
|
|
138
|
+
* // ...
|
|
139
|
+
* },
|
|
140
|
+
* {
|
|
141
|
+
* id: 'indent',
|
|
142
|
+
* commandName: 'indent',
|
|
143
|
+
* title: t( 'Increase indent' ),
|
|
144
|
+
* // ...
|
|
145
|
+
* },
|
|
146
|
+
* {
|
|
147
|
+
* id: 'insertMermaidCommand',
|
|
148
|
+
* commandName: 'insertMermaidCommand',
|
|
149
|
+
* title: t( 'Insert Mermaid diagram' ),
|
|
150
|
+
* // ...
|
|
151
|
+
* },
|
|
152
|
+
* {
|
|
153
|
+
* id: 'insertTable',
|
|
154
|
+
* commandName: 'insertTable',
|
|
155
|
+
* title: t( 'Insert table' ),
|
|
156
|
+
* // ...
|
|
157
|
+
* },
|
|
158
|
+
* {
|
|
159
|
+
* id: 'insertTableOfContents',
|
|
160
|
+
* commandName: 'insertTableOfContents',
|
|
161
|
+
* title: t( 'Table of contents' ),
|
|
162
|
+
* // ...
|
|
163
|
+
* },
|
|
164
|
+
* {
|
|
165
|
+
* id: 'numberedList',
|
|
166
|
+
* commandName: 'numberedList',
|
|
167
|
+
* title: t( 'Numbered list' ),
|
|
168
|
+
* // ...
|
|
169
|
+
* },
|
|
170
|
+
* {
|
|
171
|
+
* id: 'outdent',
|
|
172
|
+
* commandName: 'outdent',
|
|
173
|
+
* title: t( 'Decrease indent' ),
|
|
174
|
+
* // ...
|
|
175
|
+
* },
|
|
176
|
+
* {
|
|
177
|
+
* id: 'paragraph',
|
|
178
|
+
* commandName: 'paragraph',
|
|
179
|
+
* title: t( 'Paragraph' ),
|
|
180
|
+
* // ...
|
|
181
|
+
* },
|
|
182
|
+
* {
|
|
183
|
+
* id: 'todoList',
|
|
184
|
+
* commandName: 'todoList',
|
|
185
|
+
* title: t( 'To-do list' ),
|
|
186
|
+
* // ...
|
|
187
|
+
* }
|
|
188
|
+
* ]
|
|
189
|
+
*/
|
|
190
|
+
getDefaultCommands(): Array<SlashCommandDefinition>;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* An object describing a single command definition in the configuration.
|
|
194
|
+
*/
|
|
195
|
+
export interface SlashCommandDefinition {
|
|
196
|
+
/**
|
|
197
|
+
* A unique ID matched with the text that follows the slash ("/") character typed by the user,
|
|
198
|
+
* e.g. 'blockQuote', 'heading1'. See {@link module:slash-command/slashcommandconfig~SlashCommandDefinition#aliases}
|
|
199
|
+
* to learn about slash command aliases that provide a similar functionality.
|
|
200
|
+
*/
|
|
201
|
+
id: string;
|
|
202
|
+
/**
|
|
203
|
+
* The name of the command to be executed if the `execute` property was not provided,
|
|
204
|
+
* for example, 'blockQuote', 'heading'. See {@link module:core/editor/editor~Editor#commands} to learn more about available commands.
|
|
205
|
+
*/
|
|
206
|
+
commandName?: string;
|
|
207
|
+
/**
|
|
208
|
+
* A meaningful title for the command displayed in a dropdown list of possible commands. It can be a string
|
|
209
|
+
* or a callback function returning a string.
|
|
210
|
+
*/
|
|
211
|
+
title: Function | string;
|
|
212
|
+
/**
|
|
213
|
+
* An optional description for the command. Useful when the title is not descriptive enough.
|
|
214
|
+
*/
|
|
215
|
+
description?: string;
|
|
216
|
+
/**
|
|
217
|
+
* An SVG string representing the icon of the command. If not provided, a generic icon will be used instead.
|
|
218
|
+
* The default size of the icon is 20x20 pixels. Be sure to set the correct `viewBox` attribute in the icon source.
|
|
219
|
+
*
|
|
220
|
+
* See {@link module:slash-command/slashcommandconfig~SlashCommandDefinition#isIconColorInherited}.
|
|
221
|
+
*/
|
|
222
|
+
icon?: string;
|
|
223
|
+
/**
|
|
224
|
+
* By default, slash command icons are monochromatic and inherit the color of the text in the editor UI.
|
|
225
|
+
* Setting this property to `false` disables this inheritance and allows the use of complex (colorful) icons.
|
|
226
|
+
*
|
|
227
|
+
* Learn more in {@link module:ui/icon/iconview~IconView#isColorInherited}.
|
|
228
|
+
*/
|
|
229
|
+
isIconColorInherited?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* An optional list of aliases (extending the base
|
|
232
|
+
* {@link module:slash-command/slashcommandconfig~SlashCommandDefinition#id}) to be used when filtering the list of slash commands
|
|
233
|
+
* based on the text that follows the slash ("/") character.
|
|
234
|
+
*/
|
|
235
|
+
aliases?: Array<string>;
|
|
236
|
+
/**
|
|
237
|
+
* A callback function defining custom logic to decide if the command should be displayed
|
|
238
|
+
* in the dropdown list. If not provided, the default command's {@link module:core/command~Command#isEnabled} property is used instead.
|
|
239
|
+
* If it's also unavailable, it falls back to `true`. This property is checked when a user types the slash ("/") character
|
|
240
|
+
* or changes the text that follows it.
|
|
241
|
+
*
|
|
242
|
+
* This callback gets an {@link module:core/editor/editor~Editor} instance as a parameter.
|
|
243
|
+
*/
|
|
244
|
+
isEnabled?: Function;
|
|
245
|
+
/**
|
|
246
|
+
* A callback function defining custom logic for executing the command. If not provided, the default
|
|
247
|
+
* command's {@link module:core/command~Command#execute} is used instead. Custom logic is useful especially when the slash command
|
|
248
|
+
* requires some arguments (acts like a wrapper) or combines some complex logic. This property is obligatory if
|
|
249
|
+
* {@link module:slash-command/slashcommandconfig~SlashCommandDefinition#commandName} was not passed.
|
|
250
|
+
*
|
|
251
|
+
* This callback gets an {@link module:core/editor/editor~Editor} instance as a parameter.
|
|
252
|
+
*/
|
|
253
|
+
execute?: Function;
|
|
254
|
+
}
|