@atlaskit/editor-plugin-layout 2.5.1 → 2.6.0
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 +8 -0
- package/dist/cjs/layoutPlugin.js +36 -1
- package/dist/cjs/pm-plugins/utils/index.js +0 -1
- package/dist/es2019/layoutPlugin.js +35 -0
- package/dist/es2019/pm-plugins/utils/index.js +0 -1
- package/dist/esm/layoutPlugin.js +36 -0
- package/dist/esm/pm-plugins/utils/index.js +0 -1
- package/dist/types/layoutPlugin.d.ts +9 -0
- package/dist/types-ts4.5/layoutPlugin.d.ts +9 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-layout
|
|
2
2
|
|
|
3
|
+
## 2.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#144082](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144082)
|
|
8
|
+
[`583a67e0b8ee7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/583a67e0b8ee7) -
|
|
9
|
+
ED-27146 improve layout insertion behaivour, now will select into the layout after insertion.
|
|
10
|
+
|
|
3
11
|
## 2.5.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/layoutPlugin.js
CHANGED
|
@@ -4,13 +4,15 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.layoutPlugin = void 0;
|
|
7
|
+
exports.selectIntoLayoutSection = exports.layoutPlugin = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
10
|
var _schema = require("@atlaskit/adf-schema/schema");
|
|
11
11
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
13
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
14
|
+
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
15
|
+
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
14
16
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
15
17
|
var _actions = require("./pm-plugins/actions");
|
|
16
18
|
var _main = _interopRequireDefault(require("./pm-plugins/main"));
|
|
@@ -18,6 +20,33 @@ var _pluginKey = require("./pm-plugins/plugin-key");
|
|
|
18
20
|
var _resizing = _interopRequireDefault(require("./pm-plugins/resizing"));
|
|
19
21
|
var _globalStyles = require("./ui/global-styles");
|
|
20
22
|
var _toolbar = require("./ui/toolbar");
|
|
23
|
+
/**
|
|
24
|
+
* This function is used to set the selection into
|
|
25
|
+
* the first paragraph of the first column of a layout section.
|
|
26
|
+
* This function is only intended to be used after inserting a new layout section.
|
|
27
|
+
* @param tr - transaction
|
|
28
|
+
* @returns - transaction with the selection set to the first paragraph of the first column
|
|
29
|
+
*/
|
|
30
|
+
var selectIntoLayoutSection = exports.selectIntoLayoutSection = function selectIntoLayoutSection(tr) {
|
|
31
|
+
var _nodeWithPos$node$fir;
|
|
32
|
+
if (!(0, _experiments.editorExperiment)('single_column_layouts', true)) {
|
|
33
|
+
return tr;
|
|
34
|
+
}
|
|
35
|
+
var _tr$doc$type$schema$n = tr.doc.type.schema.nodes,
|
|
36
|
+
layoutSection = _tr$doc$type$schema$n.layoutSection,
|
|
37
|
+
paragraph = _tr$doc$type$schema$n.paragraph;
|
|
38
|
+
var nodeWithPos = (0, _utils.findParentNode)(function (node) {
|
|
39
|
+
return node.type === layoutSection;
|
|
40
|
+
})(tr.selection);
|
|
41
|
+
if (!nodeWithPos || !nodeWithPos.node || nodeWithPos.node.type.name !== 'layoutSection' || ((_nodeWithPos$node$fir = nodeWithPos.node.firstChild) === null || _nodeWithPos$node$fir === void 0 || (_nodeWithPos$node$fir = _nodeWithPos$node$fir.firstChild) === null || _nodeWithPos$node$fir === void 0 ? void 0 : _nodeWithPos$node$fir.type) !== paragraph) {
|
|
42
|
+
return tr;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// set text selection at the beginning of the layout section
|
|
46
|
+
// will set the selection to the first column
|
|
47
|
+
tr.setSelection(_state.TextSelection.create(tr.doc, nodeWithPos.pos));
|
|
48
|
+
return tr;
|
|
49
|
+
};
|
|
21
50
|
var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
|
|
22
51
|
var _api$analytics;
|
|
23
52
|
var _ref$config = _ref.config,
|
|
@@ -98,6 +127,7 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
|
|
|
98
127
|
action: function action(insert, state, _source) {
|
|
99
128
|
var tr = insert((0, _actions.createMultiColumnLayoutSection)(state, 1));
|
|
100
129
|
withInsertLayoutAnalytics(tr);
|
|
130
|
+
selectIntoLayoutSection(tr);
|
|
101
131
|
return tr;
|
|
102
132
|
}
|
|
103
133
|
}] : [];
|
|
@@ -117,6 +147,7 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
|
|
|
117
147
|
action: function action(insert, state) {
|
|
118
148
|
var tr = insert((0, _actions.createMultiColumnLayoutSection)(state, 3));
|
|
119
149
|
withInsertLayoutAnalytics(tr);
|
|
150
|
+
selectIntoLayoutSection(tr);
|
|
120
151
|
return tr;
|
|
121
152
|
}
|
|
122
153
|
}];
|
|
@@ -135,6 +166,7 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
|
|
|
135
166
|
action: function action(insert, state) {
|
|
136
167
|
var tr = insert((0, _actions.createMultiColumnLayoutSection)(state, 2));
|
|
137
168
|
withInsertLayoutAnalytics(tr);
|
|
169
|
+
selectIntoLayoutSection(tr);
|
|
138
170
|
return tr;
|
|
139
171
|
}
|
|
140
172
|
}, {
|
|
@@ -151,6 +183,7 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
|
|
|
151
183
|
action: function action(insert, state) {
|
|
152
184
|
var tr = insert((0, _actions.createMultiColumnLayoutSection)(state, 3));
|
|
153
185
|
withInsertLayoutAnalytics(tr);
|
|
186
|
+
selectIntoLayoutSection(tr);
|
|
154
187
|
return tr;
|
|
155
188
|
}
|
|
156
189
|
}, {
|
|
@@ -167,6 +200,7 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
|
|
|
167
200
|
action: function action(insert, state) {
|
|
168
201
|
var tr = insert((0, _actions.createMultiColumnLayoutSection)(state, 4));
|
|
169
202
|
withInsertLayoutAnalytics(tr);
|
|
203
|
+
selectIntoLayoutSection(tr);
|
|
170
204
|
return tr;
|
|
171
205
|
}
|
|
172
206
|
}, {
|
|
@@ -183,6 +217,7 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
|
|
|
183
217
|
action: function action(insert, state) {
|
|
184
218
|
var tr = insert((0, _actions.createMultiColumnLayoutSection)(state, 5));
|
|
185
219
|
withInsertLayoutAnalytics(tr);
|
|
220
|
+
selectIntoLayoutSection(tr);
|
|
186
221
|
return tr;
|
|
187
222
|
}
|
|
188
223
|
}]);
|
|
@@ -38,7 +38,6 @@ var selectIntoLayout = exports.selectIntoLayout = function selectIntoLayout(view
|
|
|
38
38
|
var $maybeLayoutSection = view.state.doc.resolve(posOfLayout);
|
|
39
39
|
if (((_$maybeLayoutSection$ = $maybeLayoutSection.nodeAfter) === null || _$maybeLayoutSection$ === void 0 ? void 0 : _$maybeLayoutSection$.type.name) === 'layoutSection') {
|
|
40
40
|
var _layoutSectionNode$fi;
|
|
41
|
-
// $maybeLayoutSection.posAtIndex(1, 1);
|
|
42
41
|
var layoutSectionNode = $maybeLayoutSection.nodeAfter;
|
|
43
42
|
|
|
44
43
|
// check if the childIndex is valid
|
|
@@ -4,6 +4,8 @@ import { layoutSectionWithSingleColumn } from '@atlaskit/adf-schema/schema';
|
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { layoutMessages, toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { IconFiveColumnLayout, IconFourColumnLayout, IconLayout, IconOneColumnLayout, IconThreeColumnLayout, IconTwoColumnLayout } from '@atlaskit/editor-common/quick-insert';
|
|
7
|
+
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
+
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
7
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
10
|
import { createDefaultLayoutSection, createMultiColumnLayoutSection, insertLayoutColumnsWithAnalytics } from './pm-plugins/actions';
|
|
9
11
|
import { default as createLayoutPlugin } from './pm-plugins/main';
|
|
@@ -11,6 +13,33 @@ import { pluginKey } from './pm-plugins/plugin-key';
|
|
|
11
13
|
import { default as createLayoutResizingPlugin } from './pm-plugins/resizing';
|
|
12
14
|
import { GlobalStylesWrapper } from './ui/global-styles';
|
|
13
15
|
import { buildToolbar } from './ui/toolbar';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* This function is used to set the selection into
|
|
19
|
+
* the first paragraph of the first column of a layout section.
|
|
20
|
+
* This function is only intended to be used after inserting a new layout section.
|
|
21
|
+
* @param tr - transaction
|
|
22
|
+
* @returns - transaction with the selection set to the first paragraph of the first column
|
|
23
|
+
*/
|
|
24
|
+
export const selectIntoLayoutSection = tr => {
|
|
25
|
+
var _nodeWithPos$node$fir, _nodeWithPos$node$fir2;
|
|
26
|
+
if (!editorExperiment('single_column_layouts', true)) {
|
|
27
|
+
return tr;
|
|
28
|
+
}
|
|
29
|
+
const {
|
|
30
|
+
layoutSection,
|
|
31
|
+
paragraph
|
|
32
|
+
} = tr.doc.type.schema.nodes;
|
|
33
|
+
const nodeWithPos = findParentNode(node => node.type === layoutSection)(tr.selection);
|
|
34
|
+
if (!nodeWithPos || !nodeWithPos.node || nodeWithPos.node.type.name !== 'layoutSection' || ((_nodeWithPos$node$fir = nodeWithPos.node.firstChild) === null || _nodeWithPos$node$fir === void 0 ? void 0 : (_nodeWithPos$node$fir2 = _nodeWithPos$node$fir.firstChild) === null || _nodeWithPos$node$fir2 === void 0 ? void 0 : _nodeWithPos$node$fir2.type) !== paragraph) {
|
|
35
|
+
return tr;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// set text selection at the beginning of the layout section
|
|
39
|
+
// will set the selection to the first column
|
|
40
|
+
tr.setSelection(TextSelection.create(tr.doc, nodeWithPos.pos));
|
|
41
|
+
return tr;
|
|
42
|
+
};
|
|
14
43
|
export const layoutPlugin = ({
|
|
15
44
|
config: options = {},
|
|
16
45
|
api
|
|
@@ -88,6 +117,7 @@ export const layoutPlugin = ({
|
|
|
88
117
|
action(insert, state, _source) {
|
|
89
118
|
const tr = insert(createMultiColumnLayoutSection(state, 1));
|
|
90
119
|
withInsertLayoutAnalytics(tr);
|
|
120
|
+
selectIntoLayoutSection(tr);
|
|
91
121
|
return tr;
|
|
92
122
|
}
|
|
93
123
|
}] : [];
|
|
@@ -105,6 +135,7 @@ export const layoutPlugin = ({
|
|
|
105
135
|
action(insert, state) {
|
|
106
136
|
const tr = insert(createMultiColumnLayoutSection(state, 3));
|
|
107
137
|
withInsertLayoutAnalytics(tr);
|
|
138
|
+
selectIntoLayoutSection(tr);
|
|
108
139
|
return tr;
|
|
109
140
|
}
|
|
110
141
|
}];
|
|
@@ -121,6 +152,7 @@ export const layoutPlugin = ({
|
|
|
121
152
|
action(insert, state) {
|
|
122
153
|
const tr = insert(createMultiColumnLayoutSection(state, 2));
|
|
123
154
|
withInsertLayoutAnalytics(tr);
|
|
155
|
+
selectIntoLayoutSection(tr);
|
|
124
156
|
return tr;
|
|
125
157
|
}
|
|
126
158
|
}, {
|
|
@@ -135,6 +167,7 @@ export const layoutPlugin = ({
|
|
|
135
167
|
action(insert, state) {
|
|
136
168
|
const tr = insert(createMultiColumnLayoutSection(state, 3));
|
|
137
169
|
withInsertLayoutAnalytics(tr);
|
|
170
|
+
selectIntoLayoutSection(tr);
|
|
138
171
|
return tr;
|
|
139
172
|
}
|
|
140
173
|
}, {
|
|
@@ -149,6 +182,7 @@ export const layoutPlugin = ({
|
|
|
149
182
|
action(insert, state) {
|
|
150
183
|
const tr = insert(createMultiColumnLayoutSection(state, 4));
|
|
151
184
|
withInsertLayoutAnalytics(tr);
|
|
185
|
+
selectIntoLayoutSection(tr);
|
|
152
186
|
return tr;
|
|
153
187
|
}
|
|
154
188
|
}, {
|
|
@@ -163,6 +197,7 @@ export const layoutPlugin = ({
|
|
|
163
197
|
action(insert, state) {
|
|
164
198
|
const tr = insert(createMultiColumnLayoutSection(state, 5));
|
|
165
199
|
withInsertLayoutAnalytics(tr);
|
|
200
|
+
selectIntoLayoutSection(tr);
|
|
166
201
|
return tr;
|
|
167
202
|
}
|
|
168
203
|
}];
|
|
@@ -36,7 +36,6 @@ export const selectIntoLayout = (view, posOfLayout, childIndex = 0) => {
|
|
|
36
36
|
const $maybeLayoutSection = view.state.doc.resolve(posOfLayout);
|
|
37
37
|
if (((_$maybeLayoutSection$ = $maybeLayoutSection.nodeAfter) === null || _$maybeLayoutSection$ === void 0 ? void 0 : _$maybeLayoutSection$.type.name) === 'layoutSection') {
|
|
38
38
|
var _layoutSectionNode$fi;
|
|
39
|
-
// $maybeLayoutSection.posAtIndex(1, 1);
|
|
40
39
|
const layoutSectionNode = $maybeLayoutSection.nodeAfter;
|
|
41
40
|
|
|
42
41
|
// check if the childIndex is valid
|
package/dist/esm/layoutPlugin.js
CHANGED
|
@@ -4,6 +4,8 @@ import { layoutSectionWithSingleColumn } from '@atlaskit/adf-schema/schema';
|
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import { layoutMessages, toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { IconFiveColumnLayout, IconFourColumnLayout, IconLayout, IconOneColumnLayout, IconThreeColumnLayout, IconTwoColumnLayout } from '@atlaskit/editor-common/quick-insert';
|
|
7
|
+
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
+
import { findParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
7
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
10
|
import { createDefaultLayoutSection, createMultiColumnLayoutSection, insertLayoutColumnsWithAnalytics } from './pm-plugins/actions';
|
|
9
11
|
import { default as createLayoutPlugin } from './pm-plugins/main';
|
|
@@ -11,6 +13,34 @@ import { pluginKey } from './pm-plugins/plugin-key';
|
|
|
11
13
|
import { default as createLayoutResizingPlugin } from './pm-plugins/resizing';
|
|
12
14
|
import { GlobalStylesWrapper } from './ui/global-styles';
|
|
13
15
|
import { buildToolbar } from './ui/toolbar';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* This function is used to set the selection into
|
|
19
|
+
* the first paragraph of the first column of a layout section.
|
|
20
|
+
* This function is only intended to be used after inserting a new layout section.
|
|
21
|
+
* @param tr - transaction
|
|
22
|
+
* @returns - transaction with the selection set to the first paragraph of the first column
|
|
23
|
+
*/
|
|
24
|
+
export var selectIntoLayoutSection = function selectIntoLayoutSection(tr) {
|
|
25
|
+
var _nodeWithPos$node$fir;
|
|
26
|
+
if (!editorExperiment('single_column_layouts', true)) {
|
|
27
|
+
return tr;
|
|
28
|
+
}
|
|
29
|
+
var _tr$doc$type$schema$n = tr.doc.type.schema.nodes,
|
|
30
|
+
layoutSection = _tr$doc$type$schema$n.layoutSection,
|
|
31
|
+
paragraph = _tr$doc$type$schema$n.paragraph;
|
|
32
|
+
var nodeWithPos = findParentNode(function (node) {
|
|
33
|
+
return node.type === layoutSection;
|
|
34
|
+
})(tr.selection);
|
|
35
|
+
if (!nodeWithPos || !nodeWithPos.node || nodeWithPos.node.type.name !== 'layoutSection' || ((_nodeWithPos$node$fir = nodeWithPos.node.firstChild) === null || _nodeWithPos$node$fir === void 0 || (_nodeWithPos$node$fir = _nodeWithPos$node$fir.firstChild) === null || _nodeWithPos$node$fir === void 0 ? void 0 : _nodeWithPos$node$fir.type) !== paragraph) {
|
|
36
|
+
return tr;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// set text selection at the beginning of the layout section
|
|
40
|
+
// will set the selection to the first column
|
|
41
|
+
tr.setSelection(TextSelection.create(tr.doc, nodeWithPos.pos));
|
|
42
|
+
return tr;
|
|
43
|
+
};
|
|
14
44
|
export var layoutPlugin = function layoutPlugin(_ref) {
|
|
15
45
|
var _api$analytics;
|
|
16
46
|
var _ref$config = _ref.config,
|
|
@@ -91,6 +121,7 @@ export var layoutPlugin = function layoutPlugin(_ref) {
|
|
|
91
121
|
action: function action(insert, state, _source) {
|
|
92
122
|
var tr = insert(createMultiColumnLayoutSection(state, 1));
|
|
93
123
|
withInsertLayoutAnalytics(tr);
|
|
124
|
+
selectIntoLayoutSection(tr);
|
|
94
125
|
return tr;
|
|
95
126
|
}
|
|
96
127
|
}] : [];
|
|
@@ -110,6 +141,7 @@ export var layoutPlugin = function layoutPlugin(_ref) {
|
|
|
110
141
|
action: function action(insert, state) {
|
|
111
142
|
var tr = insert(createMultiColumnLayoutSection(state, 3));
|
|
112
143
|
withInsertLayoutAnalytics(tr);
|
|
144
|
+
selectIntoLayoutSection(tr);
|
|
113
145
|
return tr;
|
|
114
146
|
}
|
|
115
147
|
}];
|
|
@@ -128,6 +160,7 @@ export var layoutPlugin = function layoutPlugin(_ref) {
|
|
|
128
160
|
action: function action(insert, state) {
|
|
129
161
|
var tr = insert(createMultiColumnLayoutSection(state, 2));
|
|
130
162
|
withInsertLayoutAnalytics(tr);
|
|
163
|
+
selectIntoLayoutSection(tr);
|
|
131
164
|
return tr;
|
|
132
165
|
}
|
|
133
166
|
}, {
|
|
@@ -144,6 +177,7 @@ export var layoutPlugin = function layoutPlugin(_ref) {
|
|
|
144
177
|
action: function action(insert, state) {
|
|
145
178
|
var tr = insert(createMultiColumnLayoutSection(state, 3));
|
|
146
179
|
withInsertLayoutAnalytics(tr);
|
|
180
|
+
selectIntoLayoutSection(tr);
|
|
147
181
|
return tr;
|
|
148
182
|
}
|
|
149
183
|
}, {
|
|
@@ -160,6 +194,7 @@ export var layoutPlugin = function layoutPlugin(_ref) {
|
|
|
160
194
|
action: function action(insert, state) {
|
|
161
195
|
var tr = insert(createMultiColumnLayoutSection(state, 4));
|
|
162
196
|
withInsertLayoutAnalytics(tr);
|
|
197
|
+
selectIntoLayoutSection(tr);
|
|
163
198
|
return tr;
|
|
164
199
|
}
|
|
165
200
|
}, {
|
|
@@ -176,6 +211,7 @@ export var layoutPlugin = function layoutPlugin(_ref) {
|
|
|
176
211
|
action: function action(insert, state) {
|
|
177
212
|
var tr = insert(createMultiColumnLayoutSection(state, 5));
|
|
178
213
|
withInsertLayoutAnalytics(tr);
|
|
214
|
+
selectIntoLayoutSection(tr);
|
|
179
215
|
return tr;
|
|
180
216
|
}
|
|
181
217
|
}]);
|
|
@@ -32,7 +32,6 @@ export var selectIntoLayout = function selectIntoLayout(view, posOfLayout) {
|
|
|
32
32
|
var $maybeLayoutSection = view.state.doc.resolve(posOfLayout);
|
|
33
33
|
if (((_$maybeLayoutSection$ = $maybeLayoutSection.nodeAfter) === null || _$maybeLayoutSection$ === void 0 ? void 0 : _$maybeLayoutSection$.type.name) === 'layoutSection') {
|
|
34
34
|
var _layoutSectionNode$fi;
|
|
35
|
-
// $maybeLayoutSection.posAtIndex(1, 1);
|
|
36
35
|
var layoutSectionNode = $maybeLayoutSection.nodeAfter;
|
|
37
36
|
|
|
38
37
|
// check if the childIndex is valid
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
import { type Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
1
2
|
import type { LayoutPlugin } from './layoutPluginType';
|
|
3
|
+
/**
|
|
4
|
+
* This function is used to set the selection into
|
|
5
|
+
* the first paragraph of the first column of a layout section.
|
|
6
|
+
* This function is only intended to be used after inserting a new layout section.
|
|
7
|
+
* @param tr - transaction
|
|
8
|
+
* @returns - transaction with the selection set to the first paragraph of the first column
|
|
9
|
+
*/
|
|
10
|
+
export declare const selectIntoLayoutSection: (tr: Transaction) => Transaction;
|
|
2
11
|
export declare const layoutPlugin: LayoutPlugin;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
+
import { type Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
1
2
|
import type { LayoutPlugin } from './layoutPluginType';
|
|
3
|
+
/**
|
|
4
|
+
* This function is used to set the selection into
|
|
5
|
+
* the first paragraph of the first column of a layout section.
|
|
6
|
+
* This function is only intended to be used after inserting a new layout section.
|
|
7
|
+
* @param tr - transaction
|
|
8
|
+
* @returns - transaction with the selection set to the first paragraph of the first column
|
|
9
|
+
*/
|
|
10
|
+
export declare const selectIntoLayoutSection: (tr: Transaction) => Transaction;
|
|
2
11
|
export declare const layoutPlugin: LayoutPlugin;
|