studiokit-scaffolding-js 4.5.3 → 4.5.4
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.
|
@@ -117,6 +117,16 @@ var TableCellBlot = /** @class */ (function (_super) {
|
|
|
117
117
|
child: child,
|
|
118
118
|
ref: refNode
|
|
119
119
|
});
|
|
120
|
+
if (child instanceof TableCellBlot) {
|
|
121
|
+
logger_1.getLogger().debug(this.statics.tagName + " insertBefore: inserting cells, copy contents", {
|
|
122
|
+
this: this,
|
|
123
|
+
child: child,
|
|
124
|
+
ref: refNode
|
|
125
|
+
});
|
|
126
|
+
child.moveChildren(this, refNode);
|
|
127
|
+
child.remove();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
120
130
|
if (this.statics.allowedChildren != null &&
|
|
121
131
|
!this.statics.allowedChildren.some(function (allowedChild) {
|
|
122
132
|
return child instanceof allowedChild;
|
|
@@ -144,6 +144,10 @@ var TableModule = /** @class */ (function () {
|
|
|
144
144
|
// Override "backspace" and "delete" actions that would delete or combine a table cell
|
|
145
145
|
var keyboard = quill.getModule('keyboard');
|
|
146
146
|
if (keyboard) {
|
|
147
|
+
keyboard.addBinding({ key: constants_1.KEY.BACKSPACE, altKey: null, ctrlKey: null, metaKey: null, shiftKey: null }, { collapsed: true, offset: 0 }, this.handleBackspace);
|
|
148
|
+
// move binding to first position
|
|
149
|
+
var backspaceOtherBinding = keyboard.bindings[constants_1.KEY.BACKSPACE].pop();
|
|
150
|
+
keyboard.bindings[constants_1.KEY.BACKSPACE].splice(0, 0, backspaceOtherBinding);
|
|
147
151
|
keyboard.addBinding({ key: constants_1.KEY.BACKSPACE }, { collapsed: false }, this.handleDeleteRange);
|
|
148
152
|
// move binding to first position
|
|
149
153
|
var backspaceRangeBinding = keyboard.bindings[constants_1.KEY.BACKSPACE].pop();
|
|
@@ -156,6 +160,10 @@ var TableModule = /** @class */ (function () {
|
|
|
156
160
|
// move binding to first position
|
|
157
161
|
var deleteRangeBinding = keyboard.bindings[constants_1.KEY.DELETE].pop();
|
|
158
162
|
keyboard.bindings[constants_1.KEY.DELETE].splice(0, 0, deleteRangeBinding);
|
|
163
|
+
keyboard.addBinding({ key: constants_1.KEY.DELETE }, { collapsed: true, altKey: true }, this.handleDelete);
|
|
164
|
+
// move binding to first position
|
|
165
|
+
var deleteWithAltBinding = keyboard.bindings[constants_1.KEY.DELETE].pop();
|
|
166
|
+
keyboard.bindings[constants_1.KEY.DELETE].splice(0, 0, deleteWithAltBinding);
|
|
159
167
|
keyboard.addBinding({ key: constants_1.KEY.DELETE }, { collapsed: true }, this.handleDelete);
|
|
160
168
|
// move binding to first position
|
|
161
169
|
var deleteBinding = keyboard.bindings[constants_1.KEY.DELETE].pop();
|
|
@@ -12,7 +12,7 @@ var isLineBeforeTable = function (line) {
|
|
|
12
12
|
};
|
|
13
13
|
exports.isLineBeforeTable = isLineBeforeTable;
|
|
14
14
|
var isLineAfterTable = function (line) {
|
|
15
|
-
return line.prev && exports.isInstanceOfBlot(line.
|
|
15
|
+
return line.prev && exports.isInstanceOfBlot(line.prev, constants_1.TABLE_BLOT_NAME.TABLE_CONTAINER);
|
|
16
16
|
};
|
|
17
17
|
exports.isLineAfterTable = isLineAfterTable;
|
|
18
18
|
var rangeRemovalWillDeleteCellWithoutRow = function (quill, range) {
|
package/package.json
CHANGED