@tiny-mce-umbraco/backoffice 16.0.0-rc2 → 16.0.0-rc2.2
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/README.md +1 -0
- package/dist-cms/README.md +1 -0
- package/dist-cms/api/client.gen.d.ts +13 -0
- package/dist-cms/api/client.gen.d.ts.map +1 -0
- package/dist-cms/api/client.gen.js +5 -0
- package/dist-cms/api/index.d.ts +3 -0
- package/dist-cms/api/index.d.ts.map +1 -0
- package/dist-cms/api/index.js +3 -0
- package/dist-cms/api/sdk.gen.d.ts +19 -0
- package/dist-cms/api/sdk.gen.d.ts.map +1 -0
- package/dist-cms/api/sdk.gen.js +16 -0
- package/dist-cms/api/types.gen.d.ts +72 -0
- package/dist-cms/api/types.gen.d.ts.map +1 -0
- package/dist-cms/api/types.gen.js +7 -0
- package/dist-cms/components/constants.d.ts +2 -0
- package/dist-cms/components/constants.d.ts.map +1 -0
- package/dist-cms/components/constants.js +1 -0
- package/dist-cms/components/index.d.ts +6 -0
- package/dist-cms/components/index.d.ts.map +1 -0
- package/dist-cms/components/index.js +5 -0
- package/dist-cms/components/input-tiny-mce/index.d.ts +7 -0
- package/dist-cms/components/input-tiny-mce/index.d.ts.map +1 -0
- package/dist-cms/components/input-tiny-mce/index.js +6 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.defaults.d.ts +5 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.defaults.d.ts.map +1 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.defaults.js +159 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.element.d.ts +37 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.element.d.ts.map +1 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.element.js +449 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.handlers.d.ts +3 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.handlers.d.ts.map +1 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.handlers.js +8 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.languages.d.ts +2 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.languages.d.ts.map +1 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.languages.js +78 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.sanitizer.d.ts +9 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.sanitizer.d.ts.map +1 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.sanitizer.js +47 -0
- package/dist-cms/components/input-tiny-mce/tiny-mce-plugin.d.ts +24 -0
- package/dist-cms/components/input-tiny-mce/tiny-mce-plugin.d.ts.map +1 -0
- package/dist-cms/components/input-tiny-mce/tiny-mce-plugin.js +16 -0
- package/dist-cms/components/manifests.d.ts +2 -0
- package/dist-cms/components/manifests.d.ts.map +1 -0
- package/dist-cms/components/manifests.js +2 -0
- package/dist-cms/components/stylesheet-rule-input/constants.d.ts +3 -0
- package/dist-cms/components/stylesheet-rule-input/constants.d.ts.map +1 -0
- package/dist-cms/components/stylesheet-rule-input/constants.js +2 -0
- package/dist-cms/components/stylesheet-rule-input/manifests.d.ts +3 -0
- package/dist-cms/components/stylesheet-rule-input/manifests.d.ts.map +1 -0
- package/dist-cms/components/stylesheet-rule-input/manifests.js +9 -0
- package/dist-cms/components/stylesheet-rule-input/stylesheet-rule-input.element.d.ts +18 -0
- package/dist-cms/components/stylesheet-rule-input/stylesheet-rule-input.element.d.ts.map +1 -0
- package/dist-cms/components/stylesheet-rule-input/stylesheet-rule-input.element.js +119 -0
- package/dist-cms/components/stylesheet-rule-input/stylesheet-rule-settings-modal.element.d.ts +12 -0
- package/dist-cms/components/stylesheet-rule-input/stylesheet-rule-settings-modal.element.d.ts.map +1 -0
- package/dist-cms/components/stylesheet-rule-input/stylesheet-rule-settings-modal.element.js +142 -0
- package/dist-cms/components/stylesheet-rule-input/stylesheet-rule-settings-modal.token.d.ts +7 -0
- package/dist-cms/components/stylesheet-rule-input/stylesheet-rule-settings-modal.token.d.ts.map +1 -0
- package/dist-cms/components/stylesheet-rule-input/stylesheet-rule-settings-modal.token.js +9 -0
- package/dist-cms/components/stylesheet-rule-ref/stylesheet-rule-ref.element.d.ts +16 -0
- package/dist-cms/components/stylesheet-rule-ref/stylesheet-rule-ref.element.d.ts.map +1 -0
- package/dist-cms/components/stylesheet-rule-ref/stylesheet-rule-ref.element.js +24 -0
- package/dist-cms/constants.d.ts +2 -0
- package/dist-cms/constants.d.ts.map +1 -0
- package/dist-cms/constants.js +1 -0
- package/dist-cms/entry-points/entry-point.d.ts +4 -0
- package/dist-cms/entry-points/entry-point.d.ts.map +1 -0
- package/dist-cms/entry-points/entry-point.js +25 -0
- package/dist-cms/entry-points/manifest.d.ts +2 -0
- package/dist-cms/entry-points/manifest.d.ts.map +1 -0
- package/dist-cms/entry-points/manifest.js +8 -0
- package/dist-cms/external/tinymce/index.d.ts +22 -0
- package/dist-cms/external/tinymce/index.d.ts.map +1 -0
- package/dist-cms/external/tinymce/index.js +18 -0
- package/dist-cms/icons/icons.d.ts +6 -0
- package/dist-cms/icons/icons.d.ts.map +1 -0
- package/dist-cms/icons/icons.js +1 -0
- package/dist-cms/icons/manifests.d.ts +2 -0
- package/dist-cms/icons/manifests.d.ts.map +1 -0
- package/dist-cms/icons/manifests.js +8 -0
- package/dist-cms/index.d.ts +5 -0
- package/dist-cms/index.d.ts.map +1 -0
- package/dist-cms/index.js +3 -0
- package/dist-cms/localizations/ar.d.ts +4 -0
- package/dist-cms/localizations/ar.d.ts.map +1 -0
- package/dist-cms/localizations/ar.js +5 -0
- package/dist-cms/localizations/bs.d.ts +4 -0
- package/dist-cms/localizations/bs.d.ts.map +1 -0
- package/dist-cms/localizations/bs.js +5 -0
- package/dist-cms/localizations/cs.d.ts +4 -0
- package/dist-cms/localizations/cs.d.ts.map +1 -0
- package/dist-cms/localizations/cs.js +5 -0
- package/dist-cms/localizations/cy.d.ts +4 -0
- package/dist-cms/localizations/cy.d.ts.map +1 -0
- package/dist-cms/localizations/cy.js +5 -0
- package/dist-cms/localizations/da.d.ts +4 -0
- package/dist-cms/localizations/da.d.ts.map +1 -0
- package/dist-cms/localizations/da.js +5 -0
- package/dist-cms/localizations/de.d.ts +4 -0
- package/dist-cms/localizations/de.d.ts.map +1 -0
- package/dist-cms/localizations/de.js +5 -0
- package/dist-cms/localizations/en.d.ts +4 -0
- package/dist-cms/localizations/en.d.ts.map +1 -0
- package/dist-cms/localizations/en.js +5 -0
- package/dist-cms/localizations/fr.d.ts +4 -0
- package/dist-cms/localizations/fr.d.ts.map +1 -0
- package/dist-cms/localizations/fr.js +5 -0
- package/dist-cms/localizations/hr.d.ts +4 -0
- package/dist-cms/localizations/hr.d.ts.map +1 -0
- package/dist-cms/localizations/hr.js +5 -0
- package/dist-cms/localizations/it.d.ts +4 -0
- package/dist-cms/localizations/it.d.ts.map +1 -0
- package/dist-cms/localizations/it.js +5 -0
- package/dist-cms/localizations/manifests.d.ts +2 -0
- package/dist-cms/localizations/manifests.d.ts.map +1 -0
- package/dist-cms/localizations/manifests.js +97 -0
- package/dist-cms/localizations/nl.d.ts +4 -0
- package/dist-cms/localizations/nl.d.ts.map +1 -0
- package/dist-cms/localizations/nl.js +5 -0
- package/dist-cms/localizations/tr.d.ts +4 -0
- package/dist-cms/localizations/tr.d.ts.map +1 -0
- package/dist-cms/localizations/tr.js +5 -0
- package/dist-cms/manifests.d.ts +2 -0
- package/dist-cms/manifests.d.ts.map +1 -0
- package/dist-cms/manifests.js +16 -0
- package/dist-cms/plugins/core/a11ychecker.tinymce-api.d.ts +6 -0
- package/dist-cms/plugins/core/a11ychecker.tinymce-api.d.ts.map +1 -0
- package/dist-cms/plugins/core/a11ychecker.tinymce-api.js +7 -0
- package/dist-cms/plugins/core/ai-assistant.tinymce-api.d.ts +9 -0
- package/dist-cms/plugins/core/ai-assistant.tinymce-api.d.ts.map +1 -0
- package/dist-cms/plugins/core/ai-assistant.tinymce-api.js +41 -0
- package/dist-cms/plugins/core/ai-request-factory.d.ts +2 -0
- package/dist-cms/plugins/core/ai-request-factory.d.ts.map +1 -0
- package/dist-cms/plugins/core/ai-request-factory.js +33 -0
- package/dist-cms/plugins/core/basic.tinymce-api.d.ts +6 -0
- package/dist-cms/plugins/core/basic.tinymce-api.d.ts.map +1 -0
- package/dist-cms/plugins/core/basic.tinymce-api.js +7 -0
- package/dist-cms/plugins/manifests.d.ts +3 -0
- package/dist-cms/plugins/manifests.d.ts.map +1 -0
- package/dist-cms/plugins/manifests.js +506 -0
- package/dist-cms/plugins/tiny-mce-block-picker.plugin.d.ts +8 -0
- package/dist-cms/plugins/tiny-mce-block-picker.plugin.d.ts.map +1 -0
- package/dist-cms/plugins/tiny-mce-block-picker.plugin.js +99 -0
- package/dist-cms/plugins/tiny-mce-code-editor.plugin.d.ts +7 -0
- package/dist-cms/plugins/tiny-mce-code-editor.plugin.d.ts.map +1 -0
- package/dist-cms/plugins/tiny-mce-code-editor.plugin.js +42 -0
- package/dist-cms/plugins/tiny-mce-embeddedmedia.plugin.d.ts +7 -0
- package/dist-cms/plugins/tiny-mce-embeddedmedia.plugin.d.ts.map +1 -0
- package/dist-cms/plugins/tiny-mce-embeddedmedia.plugin.js +74 -0
- package/dist-cms/plugins/tiny-mce-mediapicker.plugin.d.ts +7 -0
- package/dist-cms/plugins/tiny-mce-mediapicker.plugin.d.ts.map +1 -0
- package/dist-cms/plugins/tiny-mce-mediapicker.plugin.js +224 -0
- package/dist-cms/plugins/tiny-mce-multi-url-picker.plugin.d.ts +8 -0
- package/dist-cms/plugins/tiny-mce-multi-url-picker.plugin.d.ts.map +1 -0
- package/dist-cms/plugins/tiny-mce-multi-url-picker.plugin.js +172 -0
- package/dist-cms/plugins/tinymce-plugin.extension.d.ts +70 -0
- package/dist-cms/plugins/tinymce-plugin.extension.d.ts.map +1 -0
- package/dist-cms/plugins/tinymce-plugin.extension.js +1 -0
- package/dist-cms/plugins/types.d.ts +2 -0
- package/dist-cms/plugins/types.d.ts.map +1 -0
- package/dist-cms/plugins/types.js +1 -0
- package/dist-cms/property-editors/configEditor/property-editor-ui-tiny-mce-config-editor.element.d.ts +23 -0
- package/dist-cms/property-editors/configEditor/property-editor-ui-tiny-mce-config-editor.element.d.ts.map +1 -0
- package/dist-cms/property-editors/configEditor/property-editor-ui-tiny-mce-config-editor.element.js +102 -0
- package/dist-cms/property-editors/constants.d.ts +2 -0
- package/dist-cms/property-editors/constants.d.ts.map +1 -0
- package/dist-cms/property-editors/constants.js +1 -0
- package/dist-cms/property-editors/manifests.d.ts +2 -0
- package/dist-cms/property-editors/manifests.d.ts.map +1 -0
- package/dist-cms/property-editors/manifests.js +37 -0
- package/dist-cms/property-editors/plugin/property-editor-ui-tiny-mce-plugin-configuration.element.d.ts +25 -0
- package/dist-cms/property-editors/plugin/property-editor-ui-tiny-mce-plugin-configuration.element.d.ts.map +1 -0
- package/dist-cms/property-editors/plugin/property-editor-ui-tiny-mce-plugin-configuration.element.js +212 -0
- package/dist-cms/property-editors/tiny-mce/constants.d.ts +2 -0
- package/dist-cms/property-editors/tiny-mce/constants.d.ts.map +1 -0
- package/dist-cms/property-editors/tiny-mce/constants.js +1 -0
- package/dist-cms/property-editors/tiny-mce/manifests.d.ts +2 -0
- package/dist-cms/property-editors/tiny-mce/manifests.d.ts.map +1 -0
- package/dist-cms/property-editors/tiny-mce/manifests.js +149 -0
- package/dist-cms/property-editors/tiny-mce/property-editor-ui-tiny-mce.element.d.ts +16 -0
- package/dist-cms/property-editors/tiny-mce/property-editor-ui-tiny-mce.element.d.ts.map +1 -0
- package/dist-cms/property-editors/tiny-mce/property-editor-ui-tiny-mce.element.js +79 -0
- package/dist-cms/property-editors/toolbar/property-editor-ui-tiny-mce-toolbar-configuration.element.d.ts +25 -0
- package/dist-cms/property-editors/toolbar/property-editor-ui-tiny-mce-toolbar-configuration.element.d.ts.map +1 -0
- package/dist-cms/property-editors/toolbar/property-editor-ui-tiny-mce-toolbar-configuration.element.js +201 -0
- package/dist-cms/stylesheets/entity-actions/manifests.d.ts +2 -0
- package/dist-cms/stylesheets/entity-actions/manifests.d.ts.map +1 -0
- package/dist-cms/stylesheets/entity-actions/manifests.js +15 -0
- package/dist-cms/stylesheets/entity-actions/rte-stylesheet-create-option-action.d.ts +7 -0
- package/dist-cms/stylesheets/entity-actions/rte-stylesheet-create-option-action.d.ts.map +1 -0
- package/dist-cms/stylesheets/entity-actions/rte-stylesheet-create-option-action.js +8 -0
- package/dist-cms/stylesheets/manifests.d.ts +2 -0
- package/dist-cms/stylesheets/manifests.d.ts.map +1 -0
- package/dist-cms/stylesheets/manifests.js +3 -0
- package/dist-cms/stylesheets/stylesheet-rule-manager.d.ts +20 -0
- package/dist-cms/stylesheets/stylesheet-rule-manager.d.ts.map +1 -0
- package/dist-cms/stylesheets/stylesheet-rule-manager.js +57 -0
- package/dist-cms/stylesheets/workspace-views/manifests.d.ts +2 -0
- package/dist-cms/stylesheets/workspace-views/manifests.d.ts.map +1 -0
- package/dist-cms/stylesheets/workspace-views/manifests.js +22 -0
- package/dist-cms/stylesheets/workspace-views/stylesheet-rich-text-rule-workspace-view.element.d.ts +18 -0
- package/dist-cms/stylesheets/workspace-views/stylesheet-rich-text-rule-workspace-view.element.d.ts.map +1 -0
- package/dist-cms/stylesheets/workspace-views/stylesheet-rich-text-rule-workspace-view.element.js +100 -0
- package/dist-cms/tinymce.d.ts +2 -0
- package/dist-cms/tinymce.d.ts.map +1 -0
- package/dist-cms/tinymce.js +1 -0
- package/dist-cms/types.d.ts +6 -0
- package/dist-cms/types.d.ts.map +1 -0
- package/dist-cms/types.js +1 -0
- package/dist-cms/utils/index.d.ts +26 -0
- package/dist-cms/utils/index.d.ts.map +1 -0
- package/dist-cms/utils/index.js +108 -0
- package/package.json +11 -4
- package/dist/tiny-mce-umbraco.d.ts +0 -252
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
export const manifests = [
|
|
2
|
+
{
|
|
3
|
+
type: 'tinyMcePlugin',
|
|
4
|
+
alias: 'Umb.TinyMcePlugin.CodeEditor',
|
|
5
|
+
name: 'Code Editor TinyMCE Plugin',
|
|
6
|
+
js: () => import('./tiny-mce-code-editor.plugin.js'),
|
|
7
|
+
meta: {
|
|
8
|
+
toolbar: [
|
|
9
|
+
{
|
|
10
|
+
alias: 'sourcecode',
|
|
11
|
+
label: 'Source code editor',
|
|
12
|
+
icon: 'sourcecode',
|
|
13
|
+
isplugin: false,
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
type: 'tinyMcePlugin',
|
|
20
|
+
alias: 'Umb.TinyMcePlugin.MediaPicker',
|
|
21
|
+
name: 'Media Picker TinyMCE Plugin',
|
|
22
|
+
js: () => import('./tiny-mce-mediapicker.plugin.js'),
|
|
23
|
+
meta: {
|
|
24
|
+
toolbar: [
|
|
25
|
+
{
|
|
26
|
+
alias: 'umbmediapicker',
|
|
27
|
+
label: 'Image',
|
|
28
|
+
icon: 'image',
|
|
29
|
+
isplugin: false,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: 'tinyMcePlugin',
|
|
36
|
+
alias: 'Umb.TinyMcePlugin.EmbeddedMedia',
|
|
37
|
+
name: 'Embedded Media TinyMCE Plugin',
|
|
38
|
+
js: () => import('./tiny-mce-embeddedmedia.plugin.js'),
|
|
39
|
+
meta: {
|
|
40
|
+
toolbar: [
|
|
41
|
+
{
|
|
42
|
+
alias: 'umbembeddialog',
|
|
43
|
+
label: 'Embed',
|
|
44
|
+
icon: 'embed',
|
|
45
|
+
isplugin: false,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'tinyMcePlugin',
|
|
52
|
+
alias: 'Umb.TinyMcePlugin.BlockPicker',
|
|
53
|
+
name: 'Block Picker TinyMCE Plugin',
|
|
54
|
+
js: () => import('./tiny-mce-block-picker.plugin.js'),
|
|
55
|
+
meta: {
|
|
56
|
+
toolbar: [
|
|
57
|
+
{
|
|
58
|
+
alias: 'umbblockpicker',
|
|
59
|
+
label: '#blockEditor_insertBlock',
|
|
60
|
+
icon: 'visualblocks',
|
|
61
|
+
isplugin: false,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: 'tinyMcePlugin',
|
|
68
|
+
alias: 'Umb.TinyMcePlugin.MultiUrlPicker',
|
|
69
|
+
name: 'Multi Url Picker TinyMCE Plugin',
|
|
70
|
+
js: () => import('./tiny-mce-multi-url-picker.plugin.js'),
|
|
71
|
+
meta: {
|
|
72
|
+
toolbar: [
|
|
73
|
+
{
|
|
74
|
+
alias: 'link',
|
|
75
|
+
label: 'Insert/Edit link',
|
|
76
|
+
icon: 'link',
|
|
77
|
+
isplugin: false,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
alias: 'unlink',
|
|
81
|
+
label: 'Remove link',
|
|
82
|
+
icon: 'unlink',
|
|
83
|
+
isplugin: false,
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: 'tinyMcePlugin',
|
|
90
|
+
alias: 'Umb.TinyMcePlugin.Accordion',
|
|
91
|
+
name: 'TinyMCE Accorion Plugin',
|
|
92
|
+
meta: {
|
|
93
|
+
plugins: ['accordion'],
|
|
94
|
+
toolbar: [
|
|
95
|
+
{
|
|
96
|
+
alias: 'accordion',
|
|
97
|
+
label: 'Accordion',
|
|
98
|
+
icon: 'accordion',
|
|
99
|
+
isplugin: true,
|
|
100
|
+
pluginAlias: 'accordion',
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
type: 'tinyMcePlugin',
|
|
107
|
+
alias: 'Umb.TinyMcePlugin.CodeSample',
|
|
108
|
+
name: 'TinyMCE Code Sample Plugin',
|
|
109
|
+
meta: {
|
|
110
|
+
plugins: ['codesample'],
|
|
111
|
+
toolbar: [
|
|
112
|
+
{
|
|
113
|
+
alias: 'codesample',
|
|
114
|
+
label: 'Code Sample',
|
|
115
|
+
icon: 'code-sample',
|
|
116
|
+
isplugin: true,
|
|
117
|
+
pluginAlias: 'codesample',
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: 'tinyMcePlugin',
|
|
124
|
+
alias: 'Umb.TinyMcePlugin.Emoticons',
|
|
125
|
+
name: 'TinyMCE Emoticons Plugin',
|
|
126
|
+
meta: {
|
|
127
|
+
plugins: ['emoticons'],
|
|
128
|
+
toolbar: [
|
|
129
|
+
{
|
|
130
|
+
alias: 'emoticons',
|
|
131
|
+
label: 'Emoticons',
|
|
132
|
+
icon: 'emoji',
|
|
133
|
+
isplugin: true,
|
|
134
|
+
pluginAlias: 'emoticons',
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: 'tinyMcePlugin',
|
|
141
|
+
alias: 'Umb.TinyMcePlugin.Help',
|
|
142
|
+
name: 'TinyMCE Help Plugin',
|
|
143
|
+
meta: {
|
|
144
|
+
plugins: ['help'],
|
|
145
|
+
toolbar: [
|
|
146
|
+
{
|
|
147
|
+
alias: 'help',
|
|
148
|
+
label: 'Help for Editors',
|
|
149
|
+
icon: 'help',
|
|
150
|
+
isplugin: true,
|
|
151
|
+
pluginAlias: 'help',
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: 'tinyMcePlugin',
|
|
158
|
+
alias: 'Umb.TinyMcePlugin.InsertDateTime',
|
|
159
|
+
name: 'TinyMCE Insert Date/Time Plugin',
|
|
160
|
+
meta: {
|
|
161
|
+
plugins: ['insertdatetime'],
|
|
162
|
+
toolbar: [
|
|
163
|
+
{
|
|
164
|
+
alias: 'insertdatetime',
|
|
165
|
+
label: 'Insert Date/Time',
|
|
166
|
+
icon: 'insert-time',
|
|
167
|
+
isplugin: true,
|
|
168
|
+
pluginAlias: 'insertdatetime',
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
type: 'tinyMcePlugin',
|
|
175
|
+
alias: 'Umb.TinyMcePlugin.SearchReplace',
|
|
176
|
+
name: 'TinyMCE Search and Replace Plugin',
|
|
177
|
+
meta: {
|
|
178
|
+
plugins: ['searchreplace'],
|
|
179
|
+
toolbar: [
|
|
180
|
+
{
|
|
181
|
+
alias: 'searchreplace',
|
|
182
|
+
label: 'Search and Replace',
|
|
183
|
+
icon: 'search',
|
|
184
|
+
isplugin: true,
|
|
185
|
+
pluginAlias: 'searchreplace',
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
type: 'tinyMcePlugin',
|
|
192
|
+
alias: 'Umb.TinyMcePlugin.WordCount',
|
|
193
|
+
name: 'TinyMCE Word Count Plugin',
|
|
194
|
+
meta: {
|
|
195
|
+
plugins: ['wordcount'],
|
|
196
|
+
toolbar: [
|
|
197
|
+
{
|
|
198
|
+
alias: 'wordcount',
|
|
199
|
+
label: 'Word Count',
|
|
200
|
+
icon: 'character-count',
|
|
201
|
+
isplugin: true,
|
|
202
|
+
pluginAlias: 'wordcount',
|
|
203
|
+
},
|
|
204
|
+
],
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
type: 'tinyMcePlugin',
|
|
209
|
+
alias: 'Umb.TinyMcePlugin.Accessibilty',
|
|
210
|
+
name: 'TinyMCE Accessibilty Checker Plugin',
|
|
211
|
+
js: () => import('./core/a11ychecker.tinymce-api.js'),
|
|
212
|
+
meta: {
|
|
213
|
+
plugins: ['a11ychecker'],
|
|
214
|
+
toolbar: [
|
|
215
|
+
{
|
|
216
|
+
alias: 'a11ycheck',
|
|
217
|
+
label: 'Accessibility Checker (Premium Plugin)',
|
|
218
|
+
icon: 'accessibility-check',
|
|
219
|
+
isplugin: true,
|
|
220
|
+
pluginAlias: 'a11ychecker',
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
type: 'tinyMcePlugin',
|
|
227
|
+
alias: 'Umb.TinyMcePlugin.AdvancedCodeEditor',
|
|
228
|
+
name: 'TinyMCE Advanced Code Editor Plugin',
|
|
229
|
+
meta: {
|
|
230
|
+
plugins: ['advcode'],
|
|
231
|
+
toolbar: [
|
|
232
|
+
{
|
|
233
|
+
alias: 'code',
|
|
234
|
+
label: 'Advanced Code Editor (Premium Plugin)',
|
|
235
|
+
icon: 'sourcecode',
|
|
236
|
+
isplugin: true,
|
|
237
|
+
pluginAlias: 'advcode',
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
type: 'tinyMcePlugin',
|
|
244
|
+
alias: 'Umb.TinyMcePlugin.AdvancedTableEditor',
|
|
245
|
+
name: 'TinyMCE Advanced Table Editor Plugin',
|
|
246
|
+
meta: {
|
|
247
|
+
plugins: ['advtable'],
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
type: 'tinyMcePlugin',
|
|
252
|
+
alias: 'Umb.TinyMcePlugin.AdvancedTemplates',
|
|
253
|
+
name: 'TinyMCE Advanced Templates Plugin',
|
|
254
|
+
meta: {
|
|
255
|
+
plugins: ['advtemplate'],
|
|
256
|
+
toolbar: [
|
|
257
|
+
{
|
|
258
|
+
alias: 'inserttemplate',
|
|
259
|
+
label: 'Advanced Templates (Premium Plugin)',
|
|
260
|
+
icon: 'template',
|
|
261
|
+
isplugin: true,
|
|
262
|
+
pluginAlias: 'advtemplate',
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
type: 'tinyMcePlugin',
|
|
269
|
+
alias: 'Umb.TinyMcePlugin.Typography',
|
|
270
|
+
name: 'TinyMCE Advanced Typography Plugin',
|
|
271
|
+
meta: {
|
|
272
|
+
plugins: ['typography'],
|
|
273
|
+
toolbar: [
|
|
274
|
+
{
|
|
275
|
+
alias: 'typography',
|
|
276
|
+
label: 'Advanced Typography (Premium Plugin)',
|
|
277
|
+
icon: 'typography',
|
|
278
|
+
isplugin: true,
|
|
279
|
+
pluginAlias: 'typography',
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
type: 'tinyMcePlugin',
|
|
286
|
+
alias: 'Umb.TinyMcePlugin.AIAssistantShortcuts',
|
|
287
|
+
name: 'TinyMCE AI Assistant Shortcuts Plugin',
|
|
288
|
+
js: () => import('./core/ai-assistant.tinymce-api'),
|
|
289
|
+
meta: {
|
|
290
|
+
plugins: ['ai'],
|
|
291
|
+
toolbar: [
|
|
292
|
+
{
|
|
293
|
+
alias: 'aishortcuts aidialog',
|
|
294
|
+
label: 'AI Assistant Shortcuts (Premium Plugin)',
|
|
295
|
+
icon: 'ai',
|
|
296
|
+
isplugin: true,
|
|
297
|
+
pluginAlias: 'ai',
|
|
298
|
+
},
|
|
299
|
+
],
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
type: 'tinyMcePlugin',
|
|
304
|
+
alias: 'Umb.TinyMcePlugin.CaseChange',
|
|
305
|
+
name: 'TinyMCE Case Change Plugin',
|
|
306
|
+
meta: {
|
|
307
|
+
plugins: ['casechange'],
|
|
308
|
+
toolbar: [
|
|
309
|
+
{
|
|
310
|
+
alias: 'casechange',
|
|
311
|
+
label: 'Case Change (Premium Plugin)',
|
|
312
|
+
icon: 'change-case',
|
|
313
|
+
isplugin: true,
|
|
314
|
+
pluginAlias: 'casechange',
|
|
315
|
+
},
|
|
316
|
+
],
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
type: 'tinyMcePlugin',
|
|
321
|
+
alias: 'Umb.TinyMcePlugin.Checklist',
|
|
322
|
+
name: 'TinyMCE Checklist Plugin',
|
|
323
|
+
meta: {
|
|
324
|
+
plugins: ['checklist'],
|
|
325
|
+
toolbar: [
|
|
326
|
+
{
|
|
327
|
+
alias: 'checklist',
|
|
328
|
+
label: 'Checklist (Premium Plugin)',
|
|
329
|
+
icon: 'checklist',
|
|
330
|
+
isplugin: true,
|
|
331
|
+
pluginAlias: 'checklist',
|
|
332
|
+
},
|
|
333
|
+
],
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
type: 'tinyMcePlugin',
|
|
338
|
+
alias: 'Umb.TinyMcePlugin.EnhancedMediaEmbed',
|
|
339
|
+
name: 'TinyMCE Enhanced Media Embed Plugin',
|
|
340
|
+
meta: {
|
|
341
|
+
plugins: ['mediaembed'],
|
|
342
|
+
toolbar: [
|
|
343
|
+
{
|
|
344
|
+
alias: 'media',
|
|
345
|
+
label: 'Enhanced Media Embed (Premium Plugin)',
|
|
346
|
+
icon: 'image',
|
|
347
|
+
isplugin: true,
|
|
348
|
+
pluginAlias: 'mediaembed',
|
|
349
|
+
},
|
|
350
|
+
],
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
type: 'tinyMcePlugin',
|
|
355
|
+
alias: 'Umb.TinyMcePlugin.Export',
|
|
356
|
+
name: 'TinyMCE Export Plugin',
|
|
357
|
+
meta: {
|
|
358
|
+
plugins: ['export'],
|
|
359
|
+
toolbar: [
|
|
360
|
+
{
|
|
361
|
+
alias: 'export',
|
|
362
|
+
label: 'Export (Premium Plugin)',
|
|
363
|
+
icon: 'export',
|
|
364
|
+
isplugin: true,
|
|
365
|
+
pluginAlias: 'export',
|
|
366
|
+
},
|
|
367
|
+
],
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
type: 'tinyMcePlugin',
|
|
372
|
+
alias: 'Umb.TinyMcePlugin.Footnotes',
|
|
373
|
+
name: 'TinyMCE Footnotes Plugin',
|
|
374
|
+
meta: {
|
|
375
|
+
plugins: ['footnotes'],
|
|
376
|
+
toolbar: [
|
|
377
|
+
{
|
|
378
|
+
alias: 'footnotes',
|
|
379
|
+
label: 'Footnotes (Premium Plugin)',
|
|
380
|
+
icon: 'footnote',
|
|
381
|
+
isplugin: true,
|
|
382
|
+
pluginAlias: 'footnotes',
|
|
383
|
+
},
|
|
384
|
+
],
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
type: 'tinyMcePlugin',
|
|
389
|
+
alias: 'Umb.TinyMcePlugin.FormatPainter',
|
|
390
|
+
name: 'TinyMCE Format Painter Plugin',
|
|
391
|
+
meta: {
|
|
392
|
+
plugins: ['formatpainter'],
|
|
393
|
+
toolbar: [
|
|
394
|
+
{
|
|
395
|
+
alias: 'formatpainter',
|
|
396
|
+
label: 'Format Painter (Premium Plugin)',
|
|
397
|
+
icon: 'format-painter',
|
|
398
|
+
isplugin: true,
|
|
399
|
+
pluginAlias: 'formatpainter',
|
|
400
|
+
},
|
|
401
|
+
],
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
type: 'tinyMcePlugin',
|
|
406
|
+
alias: 'Umb.TinyMcePlugin.MergeTags',
|
|
407
|
+
name: 'TinyMCE Merge Tags Plugin',
|
|
408
|
+
meta: {
|
|
409
|
+
plugins: ['mergetags'],
|
|
410
|
+
toolbar: [
|
|
411
|
+
{
|
|
412
|
+
alias: 'mergetags',
|
|
413
|
+
label: 'Merge Tags (Premium Plugin)',
|
|
414
|
+
icon: 'addtag',
|
|
415
|
+
isplugin: true,
|
|
416
|
+
pluginAlias: 'mergetags',
|
|
417
|
+
},
|
|
418
|
+
],
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
type: 'tinyMcePlugin',
|
|
423
|
+
alias: 'Umb.TinyMcePlugin.PageEmbed',
|
|
424
|
+
name: 'TinyMCE Page Embed Plugin',
|
|
425
|
+
meta: {
|
|
426
|
+
plugins: ['pageembed'],
|
|
427
|
+
toolbar: [
|
|
428
|
+
{
|
|
429
|
+
alias: 'pageembed',
|
|
430
|
+
label: 'Page Embed (Premium Plugin)',
|
|
431
|
+
icon: 'embed-page',
|
|
432
|
+
isplugin: true,
|
|
433
|
+
pluginAlias: 'pageembed',
|
|
434
|
+
},
|
|
435
|
+
],
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
type: 'tinyMcePlugin',
|
|
440
|
+
alias: 'Umb.TinyMcePlugin.PowerPaste',
|
|
441
|
+
name: 'TinyMCE PowerPaste Plugin',
|
|
442
|
+
meta: {
|
|
443
|
+
plugins: ['powerpaste'],
|
|
444
|
+
toolbar: [
|
|
445
|
+
{
|
|
446
|
+
alias: 'paste',
|
|
447
|
+
label: 'PowerPaste (Premium Plugin)',
|
|
448
|
+
icon: 'paste',
|
|
449
|
+
isplugin: true,
|
|
450
|
+
pluginAlias: 'powerpaste',
|
|
451
|
+
},
|
|
452
|
+
],
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
type: 'tinyMcePlugin',
|
|
457
|
+
alias: 'Umb.TinyMcePlugin.PermanentPen',
|
|
458
|
+
name: 'TinyMCE Permanent Pen Plugin',
|
|
459
|
+
meta: {
|
|
460
|
+
plugins: ['permanentpen'],
|
|
461
|
+
toolbar: [
|
|
462
|
+
{
|
|
463
|
+
alias: 'permanentpen',
|
|
464
|
+
label: 'Permanent Pen (Premium Plugin)',
|
|
465
|
+
icon: 'permanent-pen',
|
|
466
|
+
isplugin: true,
|
|
467
|
+
pluginAlias: 'permanentpen',
|
|
468
|
+
},
|
|
469
|
+
],
|
|
470
|
+
},
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
type: 'tinyMcePlugin',
|
|
474
|
+
alias: 'Umb.TinyMcePlugin.SpellChecker',
|
|
475
|
+
name: 'TinyMCE Spell Checker Pro Plugin',
|
|
476
|
+
meta: {
|
|
477
|
+
plugins: ['tinymcespellchecker'],
|
|
478
|
+
toolbar: [
|
|
479
|
+
{
|
|
480
|
+
alias: 'spellchecker',
|
|
481
|
+
label: 'Spell Checker Pro (Premium Plugin)',
|
|
482
|
+
icon: 'spell-check',
|
|
483
|
+
isplugin: true,
|
|
484
|
+
pluginAlias: 'tinymcespellchecker',
|
|
485
|
+
},
|
|
486
|
+
],
|
|
487
|
+
},
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
type: 'tinyMcePlugin',
|
|
491
|
+
alias: 'Umb.TinyMcePlugin.TableOfContents',
|
|
492
|
+
name: 'TinyMCE Table of Contents Plugin',
|
|
493
|
+
meta: {
|
|
494
|
+
plugins: ['tableofcontents'],
|
|
495
|
+
toolbar: [
|
|
496
|
+
{
|
|
497
|
+
alias: 'tableofcontents',
|
|
498
|
+
label: 'Table of Contents (Premium Plugin)',
|
|
499
|
+
icon: 'toc',
|
|
500
|
+
isplugin: true,
|
|
501
|
+
pluginAlias: 'tableofcontents',
|
|
502
|
+
},
|
|
503
|
+
],
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UmbTinyMcePluginBase } from '../components/input-tiny-mce/tiny-mce-plugin.js';
|
|
2
|
+
import type { TinyMcePluginArguments } from '../components/input-tiny-mce/tiny-mce-plugin.js';
|
|
3
|
+
export default class UmbTinyMceMultiUrlPickerPlugin extends UmbTinyMcePluginBase {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(args: TinyMcePluginArguments);
|
|
6
|
+
showDialog(): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=tiny-mce-block-picker.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiny-mce-block-picker.plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/tiny-mce-block-picker.plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AAIvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAK9F,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,oBAAoB;;gBAMnE,IAAI,EAAE,sBAAsB;IAwClC,UAAU;CA+DhB"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _UmbTinyMceMultiUrlPickerPlugin_instances, _UmbTinyMceMultiUrlPickerPlugin_localize, _UmbTinyMceMultiUrlPickerPlugin_editor, _UmbTinyMceMultiUrlPickerPlugin_blocks, _UmbTinyMceMultiUrlPickerPlugin_entriesContext, _UmbTinyMceMultiUrlPickerPlugin_createBlock, _UmbTinyMceMultiUrlPickerPlugin_updateBlocks;
|
|
13
|
+
import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api';
|
|
14
|
+
import { UmbTinyMcePluginBase } from '../components/input-tiny-mce/tiny-mce-plugin.js';
|
|
15
|
+
import { UMB_BLOCK_RTE_DATA_CONTENT_KEY } from '@umbraco-cms/backoffice/rte';
|
|
16
|
+
import { UMB_BLOCK_RTE_ENTRIES_CONTEXT, UMB_BLOCK_RTE_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/block-rte';
|
|
17
|
+
class UmbTinyMceMultiUrlPickerPlugin extends UmbTinyMcePluginBase {
|
|
18
|
+
constructor(args) {
|
|
19
|
+
super(args);
|
|
20
|
+
_UmbTinyMceMultiUrlPickerPlugin_instances.add(this);
|
|
21
|
+
_UmbTinyMceMultiUrlPickerPlugin_localize.set(this, new UmbLocalizationController(this._host));
|
|
22
|
+
_UmbTinyMceMultiUrlPickerPlugin_editor.set(this, void 0);
|
|
23
|
+
_UmbTinyMceMultiUrlPickerPlugin_blocks.set(this, void 0);
|
|
24
|
+
_UmbTinyMceMultiUrlPickerPlugin_entriesContext.set(this, void 0);
|
|
25
|
+
__classPrivateFieldSet(this, _UmbTinyMceMultiUrlPickerPlugin_editor, args.editor, "f");
|
|
26
|
+
args.editor.ui.registry.addToggleButton('umbblockpicker', {
|
|
27
|
+
icon: 'visualblocks',
|
|
28
|
+
tooltip: __classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_localize, "f").term('blockEditor_insertBlock'),
|
|
29
|
+
onAction: () => this.showDialog(),
|
|
30
|
+
onSetup: function (api) {
|
|
31
|
+
const changed = args.editor.selection.selectorChangedWithUnbind('umb-rte-block[data-content-key], umb-rte-block-inline[data-content-key]', (state) => api.setActive(state));
|
|
32
|
+
return () => changed.unbind();
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
this.consumeContext(UMB_BLOCK_RTE_MANAGER_CONTEXT, (context) => {
|
|
36
|
+
this.observe(context?.blockTypes, (blockTypes) => {
|
|
37
|
+
__classPrivateFieldSet(this, _UmbTinyMceMultiUrlPickerPlugin_blocks, blockTypes, "f");
|
|
38
|
+
}, 'blockType');
|
|
39
|
+
this.observe(context?.contents, (contents) => {
|
|
40
|
+
__classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_instances, "m", _UmbTinyMceMultiUrlPickerPlugin_updateBlocks).call(this, contents, context?.getLayouts());
|
|
41
|
+
}, 'contents');
|
|
42
|
+
});
|
|
43
|
+
this.consumeContext(UMB_BLOCK_RTE_ENTRIES_CONTEXT, (context) => {
|
|
44
|
+
__classPrivateFieldSet(this, _UmbTinyMceMultiUrlPickerPlugin_entriesContext, context, "f");
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async showDialog() {
|
|
48
|
+
//const blockEl = this.editor.selection.getNode();
|
|
49
|
+
/*if (blockEl.nodeName === 'UMB-RTE-BLOCK' || blockEl.nodeName === 'UMB-RTE-BLOCK-INLINE') {
|
|
50
|
+
const blockkey = blockEl.getAttribute('data-content-key') ?? undefined;
|
|
51
|
+
if (blockkey) {
|
|
52
|
+
// TODO: Missing a solution to edit a block from this scope. [NL]
|
|
53
|
+
this.#editBlock(blockkey);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
}*/
|
|
57
|
+
// If no block is selected, open the block picker:
|
|
58
|
+
__classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_instances, "m", _UmbTinyMceMultiUrlPickerPlugin_createBlock).call(this);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
_UmbTinyMceMultiUrlPickerPlugin_localize = new WeakMap(), _UmbTinyMceMultiUrlPickerPlugin_editor = new WeakMap(), _UmbTinyMceMultiUrlPickerPlugin_blocks = new WeakMap(), _UmbTinyMceMultiUrlPickerPlugin_entriesContext = new WeakMap(), _UmbTinyMceMultiUrlPickerPlugin_instances = new WeakSet(), _UmbTinyMceMultiUrlPickerPlugin_createBlock = function _UmbTinyMceMultiUrlPickerPlugin_createBlock() {
|
|
62
|
+
if (!__classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_entriesContext, "f")) {
|
|
63
|
+
console.error('[Block Picker] No entries context available.');
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
let createPath = undefined;
|
|
67
|
+
if (__classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_blocks, "f")?.length === 1) {
|
|
68
|
+
const elementKey = __classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_blocks, "f")[0].contentElementTypeKey;
|
|
69
|
+
createPath = __classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_entriesContext, "f").getPathForCreateBlock() + 'modal/umb-modal-workspace/create/' + elementKey;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
createPath = __classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_entriesContext, "f").getPathForCreateBlock();
|
|
73
|
+
}
|
|
74
|
+
if (createPath) {
|
|
75
|
+
window.history.pushState({}, '', createPath);
|
|
76
|
+
}
|
|
77
|
+
}, _UmbTinyMceMultiUrlPickerPlugin_updateBlocks = function _UmbTinyMceMultiUrlPickerPlugin_updateBlocks(blocks, layouts) {
|
|
78
|
+
const editor = __classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_editor, "f");
|
|
79
|
+
if (!editor?.dom)
|
|
80
|
+
return;
|
|
81
|
+
const existingBlocks = editor.dom
|
|
82
|
+
.select('umb-rte-block, umb-rte-block-inline')
|
|
83
|
+
.map((x) => x.getAttribute(UMB_BLOCK_RTE_DATA_CONTENT_KEY));
|
|
84
|
+
const newBlocks = blocks?.filter((x) => !existingBlocks.find((contentKey) => contentKey === x.key));
|
|
85
|
+
newBlocks?.forEach((block) => {
|
|
86
|
+
// Find layout for block
|
|
87
|
+
const layout = layouts?.find((x) => x.contentKey === block.key);
|
|
88
|
+
const inline = layout?.displayInline ?? false;
|
|
89
|
+
let blockTag = 'umb-rte-block';
|
|
90
|
+
if (inline) {
|
|
91
|
+
blockTag = 'umb-rte-block-inline';
|
|
92
|
+
}
|
|
93
|
+
const blockEl = `<${blockTag} ${UMB_BLOCK_RTE_DATA_CONTENT_KEY}="${block.key}"></${blockTag}>`;
|
|
94
|
+
editor.selection.setContent(blockEl);
|
|
95
|
+
editor.setDirty(true);
|
|
96
|
+
editor.dispatch('Change');
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
export default UmbTinyMceMultiUrlPickerPlugin;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UmbTinyMcePluginBase } from '../components/input-tiny-mce/tiny-mce-plugin.js';
|
|
2
|
+
import type { TinyMcePluginArguments } from '../components/input-tiny-mce/tiny-mce-plugin.js';
|
|
3
|
+
export default class UmbTinyMceCodeEditorPlugin extends UmbTinyMcePluginBase {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(args: TinyMcePluginArguments);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=tiny-mce-code-editor.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiny-mce-code-editor.plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/tiny-mce-code-editor.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAK9F,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,oBAAoB;;gBAC/D,IAAI,EAAE,sBAAsB;CAgCxC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _UmbTinyMceCodeEditorPlugin_instances, _UmbTinyMceCodeEditorPlugin_showCodeEditor;
|
|
7
|
+
import { UmbTinyMcePluginBase } from '../components/input-tiny-mce/tiny-mce-plugin.js';
|
|
8
|
+
import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api';
|
|
9
|
+
import { UMB_CODE_EDITOR_MODAL } from '@umbraco-cms/backoffice/code-editor';
|
|
10
|
+
import { umbOpenModal } from '@umbraco-cms/backoffice/modal';
|
|
11
|
+
class UmbTinyMceCodeEditorPlugin extends UmbTinyMcePluginBase {
|
|
12
|
+
constructor(args) {
|
|
13
|
+
super(args);
|
|
14
|
+
_UmbTinyMceCodeEditorPlugin_instances.add(this);
|
|
15
|
+
const localize = new UmbLocalizationController(args.host);
|
|
16
|
+
this.editor.ui.registry.addButton('sourcecode', {
|
|
17
|
+
icon: 'sourcecode',
|
|
18
|
+
tooltip: localize.term('general_viewSourceCode'),
|
|
19
|
+
onAction: () => __classPrivateFieldGet(this, _UmbTinyMceCodeEditorPlugin_instances, "m", _UmbTinyMceCodeEditorPlugin_showCodeEditor).call(this),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
_UmbTinyMceCodeEditorPlugin_instances = new WeakSet(), _UmbTinyMceCodeEditorPlugin_showCodeEditor = async function _UmbTinyMceCodeEditorPlugin_showCodeEditor() {
|
|
24
|
+
const value = await umbOpenModal(this, UMB_CODE_EDITOR_MODAL, {
|
|
25
|
+
data: {
|
|
26
|
+
headline: 'Edit source code',
|
|
27
|
+
content: this.editor.getContent() ?? '',
|
|
28
|
+
language: 'html',
|
|
29
|
+
},
|
|
30
|
+
}).catch(() => undefined);
|
|
31
|
+
if (!value) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (!value.content) {
|
|
35
|
+
this.editor.resetContent();
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.editor.setContent(value.content.toString());
|
|
39
|
+
}
|
|
40
|
+
this.editor.dispatch('Change');
|
|
41
|
+
};
|
|
42
|
+
export default UmbTinyMceCodeEditorPlugin;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UmbTinyMcePluginBase } from '../components/input-tiny-mce/tiny-mce-plugin.js';
|
|
2
|
+
import type { TinyMcePluginArguments } from '../components/input-tiny-mce/tiny-mce-plugin.js';
|
|
3
|
+
export default class UmbTinyMceEmbeddedMediaPlugin extends UmbTinyMcePluginBase {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(args: TinyMcePluginArguments);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=tiny-mce-embeddedmedia.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiny-mce-embeddedmedia.plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/tiny-mce-embeddedmedia.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAM9F,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,oBAAoB;;gBAClE,IAAI,EAAE,sBAAsB;CAgFxC"}
|