@atlaskit/editor-plugin-placeholder-text 7.1.0 → 7.1.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-placeholder-text
|
|
2
2
|
|
|
3
|
+
## 7.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`14bcefe1ca8ed`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/14bcefe1ca8ed) -
|
|
8
|
+
upgrade use of browser util
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 7.1.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`c28cd65d12c24`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c28cd65d12c24) -
|
|
16
|
+
EDITOR-2447 Bump adf-schema to 51.3.1
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 7.1.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -10,8 +10,10 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
10
10
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
11
11
|
var _whitespace = require("@atlaskit/editor-common/whitespace");
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
14
|
var serializePlaceholderNode = function serializePlaceholderNode(node) {
|
|
14
15
|
var element = document.createElement('span');
|
|
16
|
+
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
15
17
|
element.classList.add('pm-placeholder');
|
|
16
18
|
|
|
17
19
|
// the inline node api test suite requires the following class name
|
|
@@ -22,7 +24,7 @@ var serializePlaceholderNode = function serializePlaceholderNode(node) {
|
|
|
22
24
|
elementChildren.dataset.placeholder = node.attrs.text;
|
|
23
25
|
elementChildren.setAttribute('contenteditable', 'false');
|
|
24
26
|
element.appendChild(elementChildren);
|
|
25
|
-
if (
|
|
27
|
+
if (browser.safari) {
|
|
26
28
|
element.appendChild(document.createTextNode(_whitespace.ZERO_WIDTH_SPACE));
|
|
27
29
|
} else {
|
|
28
30
|
element.appendChild(document.createElement('wbr'));
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { browser } from '@atlaskit/editor-common/browser';
|
|
1
|
+
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
2
2
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
3
3
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
5
|
const serializePlaceholderNode = node => {
|
|
5
6
|
const element = document.createElement('span');
|
|
7
|
+
const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
6
8
|
element.classList.add('pm-placeholder');
|
|
7
9
|
|
|
8
10
|
// the inline node api test suite requires the following class name
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import { browser } from '@atlaskit/editor-common/browser';
|
|
3
|
+
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
4
4
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
|
|
5
5
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
7
|
var serializePlaceholderNode = function serializePlaceholderNode(node) {
|
|
7
8
|
var element = document.createElement('span');
|
|
9
|
+
var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
8
10
|
element.classList.add('pm-placeholder');
|
|
9
11
|
|
|
10
12
|
// the inline node api test suite requires the following class name
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-placeholder-text",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.2",
|
|
4
4
|
"description": "placeholder text plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,19 +27,20 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-schema": "^51.3.
|
|
30
|
+
"@atlaskit/adf-schema": "^51.3.1",
|
|
31
31
|
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
32
32
|
"@atlaskit/editor-plugin-type-ahead": "^6.5.0",
|
|
33
33
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
34
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
34
|
+
"@atlaskit/editor-shared-styles": "^3.8.0",
|
|
35
35
|
"@atlaskit/icon": "^28.5.0",
|
|
36
36
|
"@atlaskit/theme": "^21.0.0",
|
|
37
|
+
"@atlaskit/tmp-editor-statsig": "^13.18.0",
|
|
37
38
|
"@atlaskit/tokens": "^7.0.0",
|
|
38
39
|
"@babel/runtime": "^7.0.0",
|
|
39
40
|
"@emotion/react": "^11.7.1"
|
|
40
41
|
},
|
|
41
42
|
"peerDependencies": {
|
|
42
|
-
"@atlaskit/editor-common": "^110.
|
|
43
|
+
"@atlaskit/editor-common": "^110.18.0",
|
|
43
44
|
"react": "^18.2.0",
|
|
44
45
|
"react-dom": "^18.2.0",
|
|
45
46
|
"react-intl-next": "npm:react-intl@^5.18.1"
|