@atlaskit/editor-plugin-block-controls 2.0.5 → 2.0.6
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,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 2.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#142709](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/142709)
|
|
8
|
+
[`7ca7608c6b4c8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7ca7608c6b4c8) -
|
|
9
|
+
[ux] ED-24883 Fixed bug which caused empty line prompt button to jump around in Firefox
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 2.0.5
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -102,11 +102,14 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
|
|
|
102
102
|
};
|
|
103
103
|
var TypeAheadControlWithIntl = (0, _reactIntlNext.injectIntl)(TypeAheadControl);
|
|
104
104
|
var toDOM = function toDOM(api, getPos, getIntl) {
|
|
105
|
+
var wrapper = document.createElement('span');
|
|
106
|
+
wrapper.contentEditable = 'false';
|
|
107
|
+
wrapper.setAttribute('data-empty-block-experiment', 'true');
|
|
108
|
+
wrapper.setAttribute('class', 'empty-block-experiment');
|
|
105
109
|
var element = document.createElement('span');
|
|
106
110
|
element.contentEditable = 'false';
|
|
107
|
-
element.setAttribute('style', 'position:
|
|
108
|
-
|
|
109
|
-
element.setAttribute('data-empty-block-experiment', 'true');
|
|
111
|
+
element.setAttribute('style', 'position: absolute;');
|
|
112
|
+
wrapper.appendChild(element);
|
|
110
113
|
_reactDom.default.render( /*#__PURE__*/(0, _react.createElement)(_reactIntlNext.RawIntlProvider, {
|
|
111
114
|
value: getIntl()
|
|
112
115
|
}, /*#__PURE__*/(0, _react.createElement)(TypeAheadControlWithIntl, {
|
|
@@ -118,8 +121,8 @@ var toDOM = function toDOM(api, getPos, getIntl) {
|
|
|
118
121
|
// // Cursor height cannot be controlled via CSS and is handled by the browser.
|
|
119
122
|
// // see Prosemirror forum: https://discuss.prosemirror.net/t/chrome-caret-cursor-larger-than-the-text-with-inlined-items/5946
|
|
120
123
|
var cursorHack = document.createTextNode(_whitespace.ZERO_WIDTH_SPACE);
|
|
121
|
-
|
|
122
|
-
return
|
|
124
|
+
wrapper.appendChild(cursorHack);
|
|
125
|
+
return wrapper;
|
|
123
126
|
};
|
|
124
127
|
var createEmptyBlockWidgetDecoration = exports.createEmptyBlockWidgetDecoration = function createEmptyBlockWidgetDecoration(selection, api, getIntl) {
|
|
125
128
|
if (selection instanceof _state.TextSelection && selection.$cursor) {
|
|
@@ -94,11 +94,14 @@ export const TypeAheadControl = ({
|
|
|
94
94
|
};
|
|
95
95
|
const TypeAheadControlWithIntl = injectIntl(TypeAheadControl);
|
|
96
96
|
const toDOM = (api, getPos, getIntl) => {
|
|
97
|
+
const wrapper = document.createElement('span');
|
|
98
|
+
wrapper.contentEditable = 'false';
|
|
99
|
+
wrapper.setAttribute('data-empty-block-experiment', 'true');
|
|
100
|
+
wrapper.setAttribute('class', 'empty-block-experiment');
|
|
97
101
|
const element = document.createElement('span');
|
|
98
102
|
element.contentEditable = 'false';
|
|
99
|
-
element.setAttribute('style', 'position:
|
|
100
|
-
|
|
101
|
-
element.setAttribute('data-empty-block-experiment', 'true');
|
|
103
|
+
element.setAttribute('style', 'position: absolute;');
|
|
104
|
+
wrapper.appendChild(element);
|
|
102
105
|
ReactDOM.render( /*#__PURE__*/createElement(RawIntlProvider, {
|
|
103
106
|
value: getIntl()
|
|
104
107
|
}, /*#__PURE__*/createElement(TypeAheadControlWithIntl, {
|
|
@@ -110,8 +113,8 @@ const toDOM = (api, getPos, getIntl) => {
|
|
|
110
113
|
// // Cursor height cannot be controlled via CSS and is handled by the browser.
|
|
111
114
|
// // see Prosemirror forum: https://discuss.prosemirror.net/t/chrome-caret-cursor-larger-than-the-text-with-inlined-items/5946
|
|
112
115
|
const cursorHack = document.createTextNode(ZERO_WIDTH_SPACE);
|
|
113
|
-
|
|
114
|
-
return
|
|
116
|
+
wrapper.appendChild(cursorHack);
|
|
117
|
+
return wrapper;
|
|
115
118
|
};
|
|
116
119
|
export const createEmptyBlockWidgetDecoration = (selection, api, getIntl) => {
|
|
117
120
|
if (selection instanceof TextSelection && selection.$cursor) {
|
|
@@ -91,11 +91,14 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
|
|
|
91
91
|
};
|
|
92
92
|
var TypeAheadControlWithIntl = injectIntl(TypeAheadControl);
|
|
93
93
|
var toDOM = function toDOM(api, getPos, getIntl) {
|
|
94
|
+
var wrapper = document.createElement('span');
|
|
95
|
+
wrapper.contentEditable = 'false';
|
|
96
|
+
wrapper.setAttribute('data-empty-block-experiment', 'true');
|
|
97
|
+
wrapper.setAttribute('class', 'empty-block-experiment');
|
|
94
98
|
var element = document.createElement('span');
|
|
95
99
|
element.contentEditable = 'false';
|
|
96
|
-
element.setAttribute('style', 'position:
|
|
97
|
-
|
|
98
|
-
element.setAttribute('data-empty-block-experiment', 'true');
|
|
100
|
+
element.setAttribute('style', 'position: absolute;');
|
|
101
|
+
wrapper.appendChild(element);
|
|
99
102
|
ReactDOM.render( /*#__PURE__*/createElement(RawIntlProvider, {
|
|
100
103
|
value: getIntl()
|
|
101
104
|
}, /*#__PURE__*/createElement(TypeAheadControlWithIntl, {
|
|
@@ -107,8 +110,8 @@ var toDOM = function toDOM(api, getPos, getIntl) {
|
|
|
107
110
|
// // Cursor height cannot be controlled via CSS and is handled by the browser.
|
|
108
111
|
// // see Prosemirror forum: https://discuss.prosemirror.net/t/chrome-caret-cursor-larger-than-the-text-with-inlined-items/5946
|
|
109
112
|
var cursorHack = document.createTextNode(ZERO_WIDTH_SPACE);
|
|
110
|
-
|
|
111
|
-
return
|
|
113
|
+
wrapper.appendChild(cursorHack);
|
|
114
|
+
return wrapper;
|
|
112
115
|
};
|
|
113
116
|
export var createEmptyBlockWidgetDecoration = function createEmptyBlockWidgetDecoration(selection, api, getIntl) {
|
|
114
117
|
if (selection instanceof TextSelection && selection.$cursor) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
36
36
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
37
37
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
38
|
-
"@atlaskit/editor-plugin-quick-insert": "^1.
|
|
38
|
+
"@atlaskit/editor-plugin-quick-insert": "^1.4.0",
|
|
39
39
|
"@atlaskit/editor-plugin-width": "^1.3.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|