@atlaskit/editor-plugin-media 1.43.0 → 1.43.1
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.43.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#177963](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/177963)
|
|
8
|
+
[`9c85947f30827`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9c85947f30827) -
|
|
9
|
+
Clean up feature gate on media single
|
|
10
|
+
|
|
3
11
|
## 1.43.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -651,20 +651,13 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
651
651
|
return (0, _createClass2.default)(MediaSingleNodeView, [{
|
|
652
652
|
key: "createDomRef",
|
|
653
653
|
value: function createDomRef() {
|
|
654
|
+
var _this$reactComponentP;
|
|
654
655
|
var domRef = document.createElement('div');
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
this.updateDomRefContentEditable(domRef, initialViewMode);
|
|
661
|
-
} else {
|
|
662
|
-
if (this.reactComponentProps.mediaOptions && this.reactComponentProps.mediaOptions.allowMediaSingleEditable) {
|
|
663
|
-
// workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
|
|
664
|
-
// see also: https://github.com/ProseMirror/prosemirror/issues/884
|
|
665
|
-
domRef.contentEditable = 'true';
|
|
666
|
-
}
|
|
667
|
-
}
|
|
656
|
+
|
|
657
|
+
// control the domRef contentEditable attribute based on the editor view mode
|
|
658
|
+
this.unsubscribeToViewModeChange = this.subscribeToViewModeChange(domRef);
|
|
659
|
+
var initialViewMode = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.sharedState.currentState()) === null || _this$reactComponentP === void 0 ? void 0 : _this$reactComponentP.mode;
|
|
660
|
+
this.updateDomRefContentEditable(domRef, initialViewMode);
|
|
668
661
|
if ((0, _platformFeatureFlags.fg)('platform_editor_media_extended_resize_experience')) {
|
|
669
662
|
domRef.classList.add('media-extended-resize-experience');
|
|
670
663
|
}
|
|
@@ -561,20 +561,13 @@ class MediaSingleNodeView extends ReactNodeView {
|
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
563
|
createDomRef() {
|
|
564
|
+
var _this$reactComponentP, _this$reactComponentP2, _this$reactComponentP3;
|
|
564
565
|
const domRef = document.createElement('div');
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
this.updateDomRefContentEditable(domRef, initialViewMode);
|
|
571
|
-
} else {
|
|
572
|
-
if (this.reactComponentProps.mediaOptions && this.reactComponentProps.mediaOptions.allowMediaSingleEditable) {
|
|
573
|
-
// workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
|
|
574
|
-
// see also: https://github.com/ProseMirror/prosemirror/issues/884
|
|
575
|
-
domRef.contentEditable = 'true';
|
|
576
|
-
}
|
|
577
|
-
}
|
|
566
|
+
|
|
567
|
+
// control the domRef contentEditable attribute based on the editor view mode
|
|
568
|
+
this.unsubscribeToViewModeChange = this.subscribeToViewModeChange(domRef);
|
|
569
|
+
const initialViewMode = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 ? void 0 : (_this$reactComponentP2 = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : (_this$reactComponentP3 = _this$reactComponentP2.sharedState.currentState()) === null || _this$reactComponentP3 === void 0 ? void 0 : _this$reactComponentP3.mode;
|
|
570
|
+
this.updateDomRefContentEditable(domRef, initialViewMode);
|
|
578
571
|
if (fg('platform_editor_media_extended_resize_experience')) {
|
|
579
572
|
domRef.classList.add('media-extended-resize-experience');
|
|
580
573
|
}
|
|
@@ -646,20 +646,13 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
646
646
|
return _createClass(MediaSingleNodeView, [{
|
|
647
647
|
key: "createDomRef",
|
|
648
648
|
value: function createDomRef() {
|
|
649
|
+
var _this$reactComponentP;
|
|
649
650
|
var domRef = document.createElement('div');
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
this.updateDomRefContentEditable(domRef, initialViewMode);
|
|
656
|
-
} else {
|
|
657
|
-
if (this.reactComponentProps.mediaOptions && this.reactComponentProps.mediaOptions.allowMediaSingleEditable) {
|
|
658
|
-
// workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
|
|
659
|
-
// see also: https://github.com/ProseMirror/prosemirror/issues/884
|
|
660
|
-
domRef.contentEditable = 'true';
|
|
661
|
-
}
|
|
662
|
-
}
|
|
651
|
+
|
|
652
|
+
// control the domRef contentEditable attribute based on the editor view mode
|
|
653
|
+
this.unsubscribeToViewModeChange = this.subscribeToViewModeChange(domRef);
|
|
654
|
+
var initialViewMode = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.sharedState.currentState()) === null || _this$reactComponentP === void 0 ? void 0 : _this$reactComponentP.mode;
|
|
655
|
+
this.updateDomRefContentEditable(domRef, initialViewMode);
|
|
663
656
|
if (fg('platform_editor_media_extended_resize_experience')) {
|
|
664
657
|
domRef.classList.add('media-extended-resize-experience');
|
|
665
658
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.43.
|
|
3
|
+
"version": "1.43.1",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -148,9 +148,6 @@
|
|
|
148
148
|
"platform-visual-refresh-icons": {
|
|
149
149
|
"type": "boolean"
|
|
150
150
|
},
|
|
151
|
-
"platform_editor_prevent_delete_image_in_view_mode": {
|
|
152
|
-
"type": "boolean"
|
|
153
|
-
},
|
|
154
151
|
"platform_editor_inline_resize_media_to_edge": {
|
|
155
152
|
"type": "boolean"
|
|
156
153
|
},
|