@atlaskit/editor-plugin-block-type 10.3.0 → 10.3.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-block-type
|
|
2
2
|
|
|
3
|
+
## 10.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`2702e8bc600ac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2702e8bc600ac) -
|
|
8
|
+
Add the empty line to history so it can be part of undo stack correctly.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 10.3.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -93,7 +93,11 @@ var createPlugin = exports.createPlugin = function createPlugin(editorAPI, dispa
|
|
|
93
93
|
var lastNode = pos.node(1);
|
|
94
94
|
var paragraph = newState.schema.nodes.paragraph;
|
|
95
95
|
if (lastNode && lastNode.isBlock && lastNode.type !== paragraph) {
|
|
96
|
-
|
|
96
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_fix_insert_paragraph_undo')) {
|
|
97
|
+
return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create());
|
|
98
|
+
} else {
|
|
99
|
+
return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create()).setMeta('addToHistory', false);
|
|
100
|
+
}
|
|
97
101
|
}
|
|
98
102
|
}
|
|
99
103
|
},
|
|
@@ -84,7 +84,11 @@ export const createPlugin = (editorAPI, dispatch, lastNodeMustBeParagraph, inclu
|
|
|
84
84
|
paragraph
|
|
85
85
|
} = newState.schema.nodes;
|
|
86
86
|
if (lastNode && lastNode.isBlock && lastNode.type !== paragraph) {
|
|
87
|
-
|
|
87
|
+
if (fg('platform_editor_fix_insert_paragraph_undo')) {
|
|
88
|
+
return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create());
|
|
89
|
+
} else {
|
|
90
|
+
return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create()).setMeta('addToHistory', false);
|
|
91
|
+
}
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
94
|
},
|
|
@@ -86,7 +86,11 @@ export var createPlugin = function createPlugin(editorAPI, dispatch, lastNodeMus
|
|
|
86
86
|
var lastNode = pos.node(1);
|
|
87
87
|
var paragraph = newState.schema.nodes.paragraph;
|
|
88
88
|
if (lastNode && lastNode.isBlock && lastNode.type !== paragraph) {
|
|
89
|
-
|
|
89
|
+
if (fg('platform_editor_fix_insert_paragraph_undo')) {
|
|
90
|
+
return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create());
|
|
91
|
+
} else {
|
|
92
|
+
return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create()).setMeta('addToHistory', false);
|
|
93
|
+
}
|
|
90
94
|
}
|
|
91
95
|
}
|
|
92
96
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.1",
|
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,21 +43,21 @@
|
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
44
|
"@atlaskit/editor-toolbar": "^0.18.0",
|
|
45
45
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
46
|
-
"@atlaskit/icon": "^29.
|
|
47
|
-
"@atlaskit/icon-lab": "^5.
|
|
46
|
+
"@atlaskit/icon": "^29.3.0",
|
|
47
|
+
"@atlaskit/icon-lab": "^5.13.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
50
50
|
"@atlaskit/primitives": "^16.4.0",
|
|
51
51
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
52
52
|
"@atlaskit/prosemirror-input-rules": "^3.6.0",
|
|
53
53
|
"@atlaskit/theme": "^21.0.0",
|
|
54
|
-
"@atlaskit/tmp-editor-statsig": "^15.
|
|
54
|
+
"@atlaskit/tmp-editor-statsig": "^15.13.0",
|
|
55
55
|
"@atlaskit/tokens": "^8.6.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
57
57
|
"@emotion/react": "^11.7.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@atlaskit/editor-common": "^110.
|
|
60
|
+
"@atlaskit/editor-common": "^110.46.0",
|
|
61
61
|
"react": "^18.2.0",
|
|
62
62
|
"react-dom": "^18.2.0",
|
|
63
63
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -116,6 +116,9 @@
|
|
|
116
116
|
"platform_editor_use_preferences_plugin": {
|
|
117
117
|
"type": "boolean"
|
|
118
118
|
},
|
|
119
|
+
"platform_editor_fix_insert_paragraph_undo": {
|
|
120
|
+
"type": "boolean"
|
|
121
|
+
},
|
|
119
122
|
"platform_editor_adf_with_localid": {
|
|
120
123
|
"type": "boolean"
|
|
121
124
|
},
|