@tiny-mce-umbraco/backoffice 17.3.4 → 17.6.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/dist-cms/README.md +1 -0
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.defaults.d.ts.map +1 -1
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.defaults.js +175 -6
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.element.d.ts +4 -1
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.element.d.ts.map +1 -1
- package/dist-cms/components/input-tiny-mce/input-tiny-mce.element.js +97 -12
- package/dist-cms/components/input-tiny-mce/shadow-dom-selection.d.ts +16 -0
- package/dist-cms/components/input-tiny-mce/shadow-dom-selection.d.ts.map +1 -0
- package/dist-cms/components/input-tiny-mce/shadow-dom-selection.js +112 -0
- package/dist-cms/components/stylesheet-rule-input/stylesheet-rule-input.element.d.ts +1 -1
- package/dist-cms/entry-points/blob-download-router-fix.d.ts +56 -0
- package/dist-cms/entry-points/blob-download-router-fix.d.ts.map +1 -0
- package/dist-cms/entry-points/blob-download-router-fix.js +81 -0
- package/dist-cms/entry-points/entry-point.d.ts.map +1 -1
- package/dist-cms/entry-points/entry-point.js +7 -1
- package/dist-cms/localizations/ar.d.ts.map +1 -1
- package/dist-cms/localizations/ar.js +3 -0
- package/dist-cms/localizations/bs.d.ts.map +1 -1
- package/dist-cms/localizations/bs.js +3 -0
- package/dist-cms/localizations/cy.d.ts.map +1 -1
- package/dist-cms/localizations/cy.js +3 -0
- package/dist-cms/localizations/da.d.ts.map +1 -1
- package/dist-cms/localizations/da.js +4 -0
- package/dist-cms/localizations/en.d.ts.map +1 -1
- package/dist-cms/localizations/en.js +4 -0
- package/dist-cms/localizations/hr.d.ts.map +1 -1
- package/dist-cms/localizations/hr.js +3 -0
- package/dist-cms/localizations/it.d.ts.map +1 -1
- package/dist-cms/localizations/it.js +3 -0
- package/dist-cms/localizations/manifests.d.ts.map +1 -1
- package/dist-cms/localizations/manifests.js +24 -24
- package/dist-cms/localizations/nl.d.ts.map +1 -1
- package/dist-cms/localizations/nl.js +3 -0
- package/dist-cms/localizations/tr.d.ts.map +1 -1
- package/dist-cms/localizations/tr.js +3 -0
- package/dist-cms/plugins/manifests.d.ts.map +1 -1
- package/dist-cms/plugins/manifests.js +17 -0
- package/dist-cms/plugins/tiny-mce-block-picker.plugin.d.ts.map +1 -1
- package/dist-cms/plugins/tiny-mce-block-picker.plugin.js +20 -2
- package/dist-cms/plugins/tiny-mce-embeddedmedia.plugin.d.ts.map +1 -1
- package/dist-cms/plugins/tiny-mce-embeddedmedia.plugin.js +1 -0
- package/dist-cms/plugins/tiny-mce-mediapicker.plugin.d.ts.map +1 -1
- package/dist-cms/plugins/tiny-mce-mediapicker.plugin.js +127 -43
- package/dist-cms/property-editors/configEditor/property-editor-ui-tiny-mce-config-editor.element.d.ts.map +1 -1
- package/dist-cms/property-editors/configEditor/property-editor-ui-tiny-mce-config-editor.element.js +0 -1
- package/dist-cms/property-editors/manifests.js +3 -3
- package/dist-cms/property-editors/plugin/property-editor-ui-tiny-mce-plugin-configuration.element.d.ts.map +1 -1
- package/dist-cms/property-editors/plugin/property-editor-ui-tiny-mce-plugin-configuration.element.js +15 -5
- package/dist-cms/property-editors/tiny-mce/manifests.d.ts.map +1 -1
- package/dist-cms/property-editors/tiny-mce/manifests.js +2 -1
- package/dist-cms/utils/index.d.ts +15 -5
- package/dist-cms/utils/index.d.ts.map +1 -1
- package/dist-cms/utils/index.js +27 -5
- package/package.json +6 -6
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workaround: let blob:/data: downloads through Umbraco's router.
|
|
3
|
+
*
|
|
4
|
+
* ## The problem
|
|
5
|
+
*
|
|
6
|
+
* Umbraco's router (`router-slot`) installs a global click listener that converts any same-origin
|
|
7
|
+
* anchor click into a history navigation — see
|
|
8
|
+
* `packages/core/router/router-slot/util/anchor.ts` (`ensureAnchorHistory`):
|
|
9
|
+
*
|
|
10
|
+
* ```js
|
|
11
|
+
* fullUrl = new URL(href, document.baseURI);
|
|
12
|
+
* if (fullUrl.origin !== location.origin || ...) return;
|
|
13
|
+
* e.preventDefault();
|
|
14
|
+
* history.pushState(null, '', fullUrl);
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* Blob URLs inherit the origin of the document that created them, so
|
|
18
|
+
* `new URL('blob:https://site:44308/<uuid>').origin` is `https://site:44308` — the origin guard
|
|
19
|
+
* passes and the anchor is treated as an internal navigation. The router then:
|
|
20
|
+
*
|
|
21
|
+
* 1. calls `e.preventDefault()`, which **cancels the download**, and
|
|
22
|
+
* 2. calls `history.pushState` with a `blob:` URL, which is invalid and throws
|
|
23
|
+
* `SecurityError: A history state object with URL 'blob:…' cannot be created in a document
|
|
24
|
+
* with origin '…'`.
|
|
25
|
+
*
|
|
26
|
+
* The net effect is that any download served from a `blob:` or `data:` URL inside the backoffice
|
|
27
|
+
* silently fails. TinyMCE's `export` plugin (PDF export via `clientpdf`) hits this on every
|
|
28
|
+
* download attempt.
|
|
29
|
+
*
|
|
30
|
+
* ## The fix
|
|
31
|
+
*
|
|
32
|
+
* The router deliberately skips anchors carrying `data-router-slot="disabled"`. We cannot set that
|
|
33
|
+
* at creation time because the anchor is created inside TinyMCE's minified plugin bundle, so we tag
|
|
34
|
+
* it in flight instead: this listener is registered in the **capture** phase on `window`, which runs
|
|
35
|
+
* before the router's own bubble-phase listener on that same target. By the time the router sees the
|
|
36
|
+
* event, the anchor is marked and the router leaves it alone.
|
|
37
|
+
*
|
|
38
|
+
* Only `blob:` and `data:` are tagged. Ordinary links are untouched, so in-app navigation is
|
|
39
|
+
* unaffected.
|
|
40
|
+
*
|
|
41
|
+
* ## Upstream
|
|
42
|
+
*
|
|
43
|
+
* This is arguably an Umbraco defect: the router should not attempt to route non-`http(s)` schemes
|
|
44
|
+
* at all, which would also cover `mailto:` and `tel:`. It affects any blob-based download in the
|
|
45
|
+
* backoffice, not only TinyMCE. Verified present in Umbraco 17.6.2, and `anchor.ts` is byte-identical
|
|
46
|
+
* back to at least 17.5.0 — so this is long-standing, not a regression. Remove this workaround once
|
|
47
|
+
* the router gains a scheme guard.
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
* Starts tagging `blob:`/`data:` anchors so Umbraco's router does not cancel the download.
|
|
51
|
+
* Safe to call more than once; only the first call registers a listener.
|
|
52
|
+
*/
|
|
53
|
+
export declare function enableBlobDownloadWorkaround(): void;
|
|
54
|
+
/** Removes the listener registered by {@link enableBlobDownloadWorkaround}. */
|
|
55
|
+
export declare function disableBlobDownloadWorkaround(): void;
|
|
56
|
+
//# sourceMappingURL=blob-download-router-fix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blob-download-router-fix.d.ts","sourceRoot":"","sources":["../../src/entry-points/blob-download-router-fix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAqBH;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,IAAI,CAKnD;AAED,+EAA+E;AAC/E,wBAAgB,6BAA6B,IAAI,IAAI,CAIpD"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workaround: let blob:/data: downloads through Umbraco's router.
|
|
3
|
+
*
|
|
4
|
+
* ## The problem
|
|
5
|
+
*
|
|
6
|
+
* Umbraco's router (`router-slot`) installs a global click listener that converts any same-origin
|
|
7
|
+
* anchor click into a history navigation — see
|
|
8
|
+
* `packages/core/router/router-slot/util/anchor.ts` (`ensureAnchorHistory`):
|
|
9
|
+
*
|
|
10
|
+
* ```js
|
|
11
|
+
* fullUrl = new URL(href, document.baseURI);
|
|
12
|
+
* if (fullUrl.origin !== location.origin || ...) return;
|
|
13
|
+
* e.preventDefault();
|
|
14
|
+
* history.pushState(null, '', fullUrl);
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* Blob URLs inherit the origin of the document that created them, so
|
|
18
|
+
* `new URL('blob:https://site:44308/<uuid>').origin` is `https://site:44308` — the origin guard
|
|
19
|
+
* passes and the anchor is treated as an internal navigation. The router then:
|
|
20
|
+
*
|
|
21
|
+
* 1. calls `e.preventDefault()`, which **cancels the download**, and
|
|
22
|
+
* 2. calls `history.pushState` with a `blob:` URL, which is invalid and throws
|
|
23
|
+
* `SecurityError: A history state object with URL 'blob:…' cannot be created in a document
|
|
24
|
+
* with origin '…'`.
|
|
25
|
+
*
|
|
26
|
+
* The net effect is that any download served from a `blob:` or `data:` URL inside the backoffice
|
|
27
|
+
* silently fails. TinyMCE's `export` plugin (PDF export via `clientpdf`) hits this on every
|
|
28
|
+
* download attempt.
|
|
29
|
+
*
|
|
30
|
+
* ## The fix
|
|
31
|
+
*
|
|
32
|
+
* The router deliberately skips anchors carrying `data-router-slot="disabled"`. We cannot set that
|
|
33
|
+
* at creation time because the anchor is created inside TinyMCE's minified plugin bundle, so we tag
|
|
34
|
+
* it in flight instead: this listener is registered in the **capture** phase on `window`, which runs
|
|
35
|
+
* before the router's own bubble-phase listener on that same target. By the time the router sees the
|
|
36
|
+
* event, the anchor is marked and the router leaves it alone.
|
|
37
|
+
*
|
|
38
|
+
* Only `blob:` and `data:` are tagged. Ordinary links are untouched, so in-app navigation is
|
|
39
|
+
* unaffected.
|
|
40
|
+
*
|
|
41
|
+
* ## Upstream
|
|
42
|
+
*
|
|
43
|
+
* This is arguably an Umbraco defect: the router should not attempt to route non-`http(s)` schemes
|
|
44
|
+
* at all, which would also cover `mailto:` and `tel:`. It affects any blob-based download in the
|
|
45
|
+
* backoffice, not only TinyMCE. Verified present in Umbraco 17.6.2, and `anchor.ts` is byte-identical
|
|
46
|
+
* back to at least 17.5.0 — so this is long-standing, not a regression. Remove this workaround once
|
|
47
|
+
* the router gains a scheme guard.
|
|
48
|
+
*/
|
|
49
|
+
/** Schemes that must never be handed to `history.pushState`. */
|
|
50
|
+
const NON_ROUTABLE_SCHEME = /^(?:blob|data):/i;
|
|
51
|
+
let isListening = false;
|
|
52
|
+
const onClickCapture = (event) => {
|
|
53
|
+
// composedPath() is required to see through shadow boundaries — the same approach the
|
|
54
|
+
// router itself uses.
|
|
55
|
+
const anchor = event
|
|
56
|
+
.composedPath()
|
|
57
|
+
.find((target) => target instanceof HTMLAnchorElement);
|
|
58
|
+
if (!anchor || !NON_ROUTABLE_SCHEME.test(anchor.href))
|
|
59
|
+
return;
|
|
60
|
+
// Opt this anchor out of router-slot handling. The router reads
|
|
61
|
+
// `$anchor.dataset['routerSlot'] === 'disabled'` and returns early.
|
|
62
|
+
anchor.dataset['routerSlot'] = 'disabled';
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Starts tagging `blob:`/`data:` anchors so Umbraco's router does not cancel the download.
|
|
66
|
+
* Safe to call more than once; only the first call registers a listener.
|
|
67
|
+
*/
|
|
68
|
+
export function enableBlobDownloadWorkaround() {
|
|
69
|
+
if (isListening)
|
|
70
|
+
return;
|
|
71
|
+
// Capture phase, so this runs before router-slot's bubble-phase listener on `window`.
|
|
72
|
+
window.addEventListener('click', onClickCapture, true);
|
|
73
|
+
isListening = true;
|
|
74
|
+
}
|
|
75
|
+
/** Removes the listener registered by {@link enableBlobDownloadWorkaround}. */
|
|
76
|
+
export function disableBlobDownloadWorkaround() {
|
|
77
|
+
if (!isListening)
|
|
78
|
+
return;
|
|
79
|
+
window.removeEventListener('click', onClickCapture, true);
|
|
80
|
+
isListening = false;
|
|
81
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-point.d.ts","sourceRoot":"","sources":["../../src/entry-points/entry-point.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"entry-point.d.ts","sourceRoot":"","sources":["../../src/entry-points/entry-point.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAExG,eAAO,MAAM,MAAM,EAAE,mBA2BpB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,qBAEtB,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { client } from '../api/client.gen.js';
|
|
2
|
+
import { disableBlobDownloadWorkaround, enableBlobDownloadWorkaround, } from './blob-download-router-fix.js';
|
|
2
3
|
import { UMB_AUTH_CONTEXT } from '@umbraco-cms/backoffice/auth';
|
|
3
4
|
export const onInit = (_host, _extensionRegistry) => {
|
|
5
|
+
// Let blob:/data: downloads (e.g. TinyMCE's PDF export) through Umbraco's router.
|
|
6
|
+
// See blob-download-router-fix.ts for why this is needed.
|
|
7
|
+
enableBlobDownloadWorkaround();
|
|
4
8
|
// Will use only to add in Open API config with generated TS OpenAPI HTTPS Client
|
|
5
9
|
// Do the OAuth token handshake stuff
|
|
6
10
|
_host.consumeContext(UMB_AUTH_CONTEXT, async (authContext) => {
|
|
@@ -22,4 +26,6 @@ export const onInit = (_host, _extensionRegistry) => {
|
|
|
22
26
|
});
|
|
23
27
|
});
|
|
24
28
|
};
|
|
25
|
-
export const onUnload = (_host, _extensionRegistry) => {
|
|
29
|
+
export const onUnload = (_host, _extensionRegistry) => {
|
|
30
|
+
disableBlobDownloadWorkaround();
|
|
31
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../src/localizations/ar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../src/localizations/ar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;wBASrF,yBAAyB;AAP9B,wBAO+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bs.d.ts","sourceRoot":"","sources":["../../src/localizations/bs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"bs.d.ts","sourceRoot":"","sources":["../../src/localizations/bs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;wBASrF,yBAAyB;AAP9B,wBAO+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cy.d.ts","sourceRoot":"","sources":["../../src/localizations/cy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"cy.d.ts","sourceRoot":"","sources":["../../src/localizations/cy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;wBASrF,yBAAyB;AAP9B,wBAO+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"da.d.ts","sourceRoot":"","sources":["../../src/localizations/da.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"da.d.ts","sourceRoot":"","sources":["../../src/localizations/da.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;wBAUrF,yBAAyB;AAR9B,wBAQ+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/localizations/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/localizations/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;wBAUrF,yBAAyB;AAR9B,wBAQ+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hr.d.ts","sourceRoot":"","sources":["../../src/localizations/hr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"hr.d.ts","sourceRoot":"","sources":["../../src/localizations/hr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;wBASrF,yBAAyB;AAP9B,wBAO+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../src/localizations/it.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../src/localizations/it.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;wBASrF,yBAAyB;AAP9B,wBAO+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifests.d.ts","sourceRoot":"","sources":["../../src/localizations/manifests.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifests.d.ts","sourceRoot":"","sources":["../../src/localizations/manifests.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,oBAAoB,CAoFjD,CAAC"}
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
+
import arLocalization from './ar.js';
|
|
2
|
+
import bsLocalization from './bs.js';
|
|
3
|
+
import csLocalization from './cs.js';
|
|
4
|
+
import cyLocalization from './cy.js';
|
|
5
|
+
import daLocalization from './da.js';
|
|
6
|
+
import deLocalization from './de.js';
|
|
7
|
+
import enLocalization from './en.js';
|
|
8
|
+
import frLocalization from './fr.js';
|
|
9
|
+
import hrLocalization from './hr.js';
|
|
10
|
+
import itLocalization from './it.js';
|
|
11
|
+
import nlLocalization from './nl.js';
|
|
12
|
+
import trLocalization from './tr.js';
|
|
1
13
|
export const manifests = [
|
|
2
14
|
{
|
|
3
15
|
type: 'localization',
|
|
4
16
|
name: 'TinyMCE Umbraco English Localization',
|
|
5
17
|
alias: 'Umb.TinyMCE.Localization.English',
|
|
6
|
-
|
|
7
|
-
meta: { culture: 'en' },
|
|
18
|
+
meta: { culture: 'en', localizations: enLocalization },
|
|
8
19
|
},
|
|
9
20
|
{
|
|
10
21
|
type: 'localization',
|
|
11
22
|
name: 'TinyMCE Umbraco Arabic Localization',
|
|
12
23
|
alias: 'Umb.TinyMCE.Localization.Arabic',
|
|
13
24
|
weight: -100,
|
|
14
|
-
meta: { culture: 'ar' },
|
|
15
|
-
js: () => import('./ar.js'),
|
|
25
|
+
meta: { culture: 'ar', localizations: arLocalization },
|
|
16
26
|
},
|
|
17
27
|
{
|
|
18
28
|
type: 'localization',
|
|
19
29
|
name: 'TinyMCE Umbraco Bosnian Localization',
|
|
20
30
|
alias: 'Umb.TinyMCE.Localization.Bosnian',
|
|
21
31
|
weight: -100,
|
|
22
|
-
meta: { culture: 'bs' },
|
|
23
|
-
js: () => import('./bs.js'),
|
|
32
|
+
meta: { culture: 'bs', localizations: bsLocalization },
|
|
24
33
|
},
|
|
25
34
|
{
|
|
26
35
|
type: 'localization',
|
|
27
36
|
name: 'TinyMCE Umbraco Czech Localization',
|
|
28
37
|
alias: 'Umb.TinyMCE.Localization.Czech',
|
|
29
38
|
weight: -100,
|
|
30
|
-
meta: { culture: 'cs-cz' },
|
|
31
|
-
js: () => import('./cs.js'),
|
|
39
|
+
meta: { culture: 'cs-cz', localizations: csLocalization },
|
|
32
40
|
},
|
|
33
41
|
{
|
|
34
42
|
type: 'localization',
|
|
35
43
|
name: 'TinyMCE Umbraco Welsh Localization',
|
|
36
44
|
alias: 'Umb.TinyMCE.Localization.Cy-GB',
|
|
37
45
|
weight: -100,
|
|
38
|
-
meta: { culture: 'cy' },
|
|
39
|
-
js: () => import('./cy.js'),
|
|
46
|
+
meta: { culture: 'cy', localizations: cyLocalization },
|
|
40
47
|
},
|
|
41
48
|
{
|
|
42
49
|
type: 'localization',
|
|
43
50
|
name: 'TinyMCE Umbraco Danish Localization',
|
|
44
51
|
alias: 'Umb.TinyMCE.Localization.Da_DK',
|
|
45
52
|
weight: -100,
|
|
46
|
-
meta: { culture: 'da' },
|
|
47
|
-
js: () => import('./da.js'),
|
|
53
|
+
meta: { culture: 'da', localizations: daLocalization },
|
|
48
54
|
},
|
|
49
55
|
{
|
|
50
56
|
type: 'localization',
|
|
51
57
|
name: 'TinyMCE Umbraco German Localization',
|
|
52
58
|
alias: 'Umb.TinyMCE.Localization.German',
|
|
53
59
|
weight: -100,
|
|
54
|
-
meta: { culture: 'de' },
|
|
55
|
-
js: () => import('./de.js'),
|
|
60
|
+
meta: { culture: 'de', localizations: deLocalization },
|
|
56
61
|
},
|
|
57
62
|
{
|
|
58
63
|
type: 'localization',
|
|
59
64
|
name: 'TinyMCE Umbraco French Localization',
|
|
60
65
|
alias: 'Umb.TinyMCE.Localization.French',
|
|
61
66
|
weight: -100,
|
|
62
|
-
meta: { culture: 'fr' },
|
|
63
|
-
js: () => import('./fr.js'),
|
|
67
|
+
meta: { culture: 'fr', localizations: frLocalization },
|
|
64
68
|
},
|
|
65
69
|
{
|
|
66
70
|
type: 'localization',
|
|
67
71
|
name: 'TinyMCE Umbraco Croatian Localization',
|
|
68
72
|
alias: 'Umb.TinyMCE.Localization.Croatian',
|
|
69
73
|
weight: -100,
|
|
70
|
-
meta: { culture: 'hr' },
|
|
71
|
-
js: () => import('./hr.js'),
|
|
74
|
+
meta: { culture: 'hr', localizations: hrLocalization },
|
|
72
75
|
},
|
|
73
76
|
{
|
|
74
77
|
type: 'localization',
|
|
75
78
|
name: 'TinyMCE Umbraco Italian Localization',
|
|
76
79
|
alias: 'Umb.TinyMCE.Localization.Italian',
|
|
77
80
|
weight: -100,
|
|
78
|
-
meta: { culture: 'it' },
|
|
79
|
-
js: () => import('./it.js'),
|
|
81
|
+
meta: { culture: 'it', localizations: itLocalization },
|
|
80
82
|
},
|
|
81
83
|
{
|
|
82
84
|
type: 'localization',
|
|
83
85
|
name: 'TinyMCE Umbraco Dutch Localization',
|
|
84
86
|
alias: 'Umb.TinyMCE.Localization.Dutch',
|
|
85
87
|
weight: -100,
|
|
86
|
-
meta: { culture: 'nl' },
|
|
87
|
-
js: () => import('./nl.js'),
|
|
88
|
+
meta: { culture: 'nl', localizations: nlLocalization },
|
|
88
89
|
},
|
|
89
90
|
{
|
|
90
91
|
type: 'localization',
|
|
91
92
|
name: 'TinyMCE Umbraco Turkish Localization',
|
|
92
93
|
alias: 'Umb.TinyMCE.Localization.Turkish',
|
|
93
94
|
weight: -100,
|
|
94
|
-
meta: { culture: 'tr' },
|
|
95
|
-
js: () => import('./tr.js'),
|
|
95
|
+
meta: { culture: 'tr', localizations: trLocalization },
|
|
96
96
|
},
|
|
97
97
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nl.d.ts","sourceRoot":"","sources":["../../src/localizations/nl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"nl.d.ts","sourceRoot":"","sources":["../../src/localizations/nl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;wBASrF,yBAAyB;AAP9B,wBAO+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../src/localizations/tr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../src/localizations/tr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;wBASrF,yBAAyB;AAP9B,wBAO+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifests.d.ts","sourceRoot":"","sources":["../../src/plugins/manifests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE/E,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"manifests.d.ts","sourceRoot":"","sources":["../../src/plugins/manifests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE/E,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,qBAAqB,CA2gBlD,CAAC"}
|
|
@@ -136,6 +136,23 @@ export const manifests = [
|
|
|
136
136
|
],
|
|
137
137
|
},
|
|
138
138
|
},
|
|
139
|
+
{
|
|
140
|
+
type: 'tinyMcePlugin',
|
|
141
|
+
alias: 'Umb.TinyMcePlugin.Fullscreen',
|
|
142
|
+
name: 'TinyMCE Fullscreen Plugin',
|
|
143
|
+
meta: {
|
|
144
|
+
plugins: ['fullscreen'],
|
|
145
|
+
toolbar: [
|
|
146
|
+
{
|
|
147
|
+
alias: 'fullscreen',
|
|
148
|
+
label: 'Fullscreen',
|
|
149
|
+
icon: 'fullscreen',
|
|
150
|
+
isplugin: true,
|
|
151
|
+
pluginAlias: 'fullscreen',
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
},
|
|
139
156
|
{
|
|
140
157
|
type: 'tinyMcePlugin',
|
|
141
158
|
alias: 'Umb.TinyMcePlugin.Help',
|
|
@@ -1 +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,mCAAmC,CAAC;AAIzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAKhF,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,oBAAoB;;
|
|
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,mCAAmC,CAAC;AAIzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAKhF,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,oBAAoB;;gBAOnE,IAAI,EAAE,sBAAsB;IAkDlC,UAAU;CAgFhB"}
|
|
@@ -9,7 +9,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
9
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
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
|
-
var _UmbTinyMceMultiUrlPickerPlugin_instances, _UmbTinyMceMultiUrlPickerPlugin_localize, _UmbTinyMceMultiUrlPickerPlugin_editor, _UmbTinyMceMultiUrlPickerPlugin_blocks, _UmbTinyMceMultiUrlPickerPlugin_entriesContext, _UmbTinyMceMultiUrlPickerPlugin_createBlock, _UmbTinyMceMultiUrlPickerPlugin_updateBlocks;
|
|
12
|
+
var _UmbTinyMceMultiUrlPickerPlugin_instances, _UmbTinyMceMultiUrlPickerPlugin_localize, _UmbTinyMceMultiUrlPickerPlugin_editor, _UmbTinyMceMultiUrlPickerPlugin_blocks, _UmbTinyMceMultiUrlPickerPlugin_entriesContext, _UmbTinyMceMultiUrlPickerPlugin_managerContext, _UmbTinyMceMultiUrlPickerPlugin_createBlock, _UmbTinyMceMultiUrlPickerPlugin_processPendingDeletions, _UmbTinyMceMultiUrlPickerPlugin_updateBlocks;
|
|
13
13
|
import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api';
|
|
14
14
|
import { UmbTinyMcePluginBase } from '@tiny-mce-umbraco/backoffice/core';
|
|
15
15
|
import { UMB_BLOCK_RTE_DATA_CONTENT_KEY } from '@umbraco-cms/backoffice/rte';
|
|
@@ -22,6 +22,7 @@ class UmbTinyMceMultiUrlPickerPlugin extends UmbTinyMcePluginBase {
|
|
|
22
22
|
_UmbTinyMceMultiUrlPickerPlugin_editor.set(this, void 0);
|
|
23
23
|
_UmbTinyMceMultiUrlPickerPlugin_blocks.set(this, void 0);
|
|
24
24
|
_UmbTinyMceMultiUrlPickerPlugin_entriesContext.set(this, void 0);
|
|
25
|
+
_UmbTinyMceMultiUrlPickerPlugin_managerContext.set(this, void 0);
|
|
25
26
|
__classPrivateFieldSet(this, _UmbTinyMceMultiUrlPickerPlugin_editor, args.editor, "f");
|
|
26
27
|
args.editor.ui.registry.addToggleButton('umbblockpicker', {
|
|
27
28
|
icon: 'visualblocks',
|
|
@@ -33,12 +34,16 @@ class UmbTinyMceMultiUrlPickerPlugin extends UmbTinyMcePluginBase {
|
|
|
33
34
|
},
|
|
34
35
|
});
|
|
35
36
|
this.consumeContext(UMB_BLOCK_RTE_MANAGER_CONTEXT, (context) => {
|
|
37
|
+
__classPrivateFieldSet(this, _UmbTinyMceMultiUrlPickerPlugin_managerContext, context, "f");
|
|
36
38
|
this.observe(context?.blockTypes, (blockTypes) => {
|
|
37
39
|
__classPrivateFieldSet(this, _UmbTinyMceMultiUrlPickerPlugin_blocks, blockTypes, "f");
|
|
38
40
|
}, 'blockType');
|
|
39
41
|
this.observe(context?.contents, (contents) => {
|
|
40
42
|
__classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_instances, "m", _UmbTinyMceMultiUrlPickerPlugin_updateBlocks).call(this, contents, context?.getLayouts());
|
|
41
43
|
}, 'contents');
|
|
44
|
+
this.observe(context?.pendingDeletions, (pendingDeletions) => {
|
|
45
|
+
__classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_instances, "m", _UmbTinyMceMultiUrlPickerPlugin_processPendingDeletions).call(this, pendingDeletions);
|
|
46
|
+
}, 'pendingDeletions');
|
|
42
47
|
});
|
|
43
48
|
this.consumeContext(UMB_BLOCK_RTE_ENTRIES_CONTEXT, (context) => {
|
|
44
49
|
__classPrivateFieldSet(this, _UmbTinyMceMultiUrlPickerPlugin_entriesContext, context, "f");
|
|
@@ -58,7 +63,7 @@ class UmbTinyMceMultiUrlPickerPlugin extends UmbTinyMcePluginBase {
|
|
|
58
63
|
__classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_instances, "m", _UmbTinyMceMultiUrlPickerPlugin_createBlock).call(this);
|
|
59
64
|
}
|
|
60
65
|
}
|
|
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() {
|
|
66
|
+
_UmbTinyMceMultiUrlPickerPlugin_localize = new WeakMap(), _UmbTinyMceMultiUrlPickerPlugin_editor = new WeakMap(), _UmbTinyMceMultiUrlPickerPlugin_blocks = new WeakMap(), _UmbTinyMceMultiUrlPickerPlugin_entriesContext = new WeakMap(), _UmbTinyMceMultiUrlPickerPlugin_managerContext = new WeakMap(), _UmbTinyMceMultiUrlPickerPlugin_instances = new WeakSet(), _UmbTinyMceMultiUrlPickerPlugin_createBlock = function _UmbTinyMceMultiUrlPickerPlugin_createBlock() {
|
|
62
67
|
if (!__classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_entriesContext, "f")) {
|
|
63
68
|
console.error('[Block Picker] No entries context available.');
|
|
64
69
|
return;
|
|
@@ -74,6 +79,19 @@ _UmbTinyMceMultiUrlPickerPlugin_localize = new WeakMap(), _UmbTinyMceMultiUrlPic
|
|
|
74
79
|
if (createPath) {
|
|
75
80
|
window.history.pushState({}, '', createPath);
|
|
76
81
|
}
|
|
82
|
+
}, _UmbTinyMceMultiUrlPickerPlugin_processPendingDeletions = function _UmbTinyMceMultiUrlPickerPlugin_processPendingDeletions(pendingDeletions) {
|
|
83
|
+
if (!pendingDeletions?.length)
|
|
84
|
+
return;
|
|
85
|
+
const editor = __classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_editor, "f");
|
|
86
|
+
if (!editor?.dom)
|
|
87
|
+
return;
|
|
88
|
+
pendingDeletions.forEach((contentKey) => {
|
|
89
|
+
const blockEls = editor.dom.select(`umb-rte-block[${UMB_BLOCK_RTE_DATA_CONTENT_KEY}="${contentKey}"], umb-rte-block-inline[${UMB_BLOCK_RTE_DATA_CONTENT_KEY}="${contentKey}"]`);
|
|
90
|
+
blockEls.forEach((el) => el.remove());
|
|
91
|
+
__classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_managerContext, "f")?.clearPendingDeletion(contentKey);
|
|
92
|
+
});
|
|
93
|
+
editor.setDirty(true);
|
|
94
|
+
editor.dispatch('Change');
|
|
77
95
|
}, _UmbTinyMceMultiUrlPickerPlugin_updateBlocks = function _UmbTinyMceMultiUrlPickerPlugin_updateBlocks(blocks, layouts) {
|
|
78
96
|
const editor = __classPrivateFieldGet(this, _UmbTinyMceMultiUrlPickerPlugin_editor, "f");
|
|
79
97
|
if (!editor?.dom)
|
|
@@ -1 +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,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAMhF,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,oBAAoB;;gBAClE,IAAI,EAAE,sBAAsB;
|
|
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,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAMhF,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,oBAAoB;;gBAClE,IAAI,EAAE,sBAAsB;CAiFxC"}
|
|
@@ -31,6 +31,7 @@ _UmbTinyMceEmbeddedMediaPlugin_instances = new WeakSet(), _UmbTinyMceEmbeddedMed
|
|
|
31
31
|
let modify = {
|
|
32
32
|
width: 360,
|
|
33
33
|
height: 240,
|
|
34
|
+
constrain: true
|
|
34
35
|
};
|
|
35
36
|
if (selectedElm.nodeName.toUpperCase() === 'DIV' && selectedElm.classList.contains('umb-embed-holder')) {
|
|
36
37
|
// See if we can go and get the attributes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tiny-mce-mediapicker.plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/tiny-mce-mediapicker.plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"tiny-mce-mediapicker.plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/tiny-mce-mediapicker.plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAyChF,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,oBAAoB;;gBAQhE,IAAI,EAAE,sBAAsB;CA2VxC"}
|