@portabletext/editor 5.0.2 → 5.0.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.
- package/lib/index.js +17 -4
- package/lib/index.js.map +1 -1
- package/package.json +8 -8
package/lib/index.js
CHANGED
|
@@ -7541,10 +7541,23 @@ const MAX_LIST_LEVEL = 10, clearListOnBackspace = defineBehavior({
|
|
|
7541
7541
|
inheritListLevel,
|
|
7542
7542
|
inheritListItem,
|
|
7543
7543
|
inheritListProperties
|
|
7544
|
-
},
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7544
|
+
}, coreBehaviors = [...coreAnnotationBehaviors, coreDecoratorBehaviors.strongShortcut, coreDecoratorBehaviors.emShortcut, coreDecoratorBehaviors.underlineShortcut, coreDecoratorBehaviors.codeShortcut, ...coreDndBehaviors, coreBlockObjectBehaviors.clickingAboveLonelyBlockObject, coreBlockObjectBehaviors.clickingBelowLonelyBlockObject, coreBlockObjectBehaviors.arrowDownOnLonelyBlockObject, coreBlockObjectBehaviors.arrowUpOnLonelyBlockObject, coreBlockObjectBehaviors.breakingBlockObject, coreBlockObjectBehaviors.deletingEmptyTextBlockAfterBlockObject, coreBlockObjectBehaviors.deletingEmptyTextBlockBeforeBlockObject, ...coreInsertBehaviors, coreListBehaviors.clearListOnBackspace, coreListBehaviors.unindentListOnBackspace, coreListBehaviors.mergeTextIntoListOnDelete, coreListBehaviors.mergeTextIntoListOnBackspace, coreListBehaviors.deletingListFromStart, coreListBehaviors.clearListOnEnter, coreListBehaviors.indentListOnTab, coreListBehaviors.unindentListOnShiftTab, coreListBehaviors.inheritListLevel, coreListBehaviors.inheritListItem, coreListBehaviors.inheritListProperties, coreInsertBreakBehaviors.breakingAtTheEndOfTextBlock, coreInsertBreakBehaviors.breakingAtTheStartOfTextBlock, coreInsertBreakBehaviors.breakingEntireBlocks, coreInsertBreakBehaviors.breakingInlineObject];
|
|
7545
|
+
let previousPriority = corePriority;
|
|
7546
|
+
const coreBehaviorsConfigArray = [];
|
|
7547
|
+
for (const behavior of coreBehaviors) {
|
|
7548
|
+
const priority = createEditorPriority({
|
|
7549
|
+
name: "core",
|
|
7550
|
+
reference: {
|
|
7551
|
+
priority: previousPriority,
|
|
7552
|
+
importance: "lower"
|
|
7553
|
+
}
|
|
7554
|
+
});
|
|
7555
|
+
coreBehaviorsConfigArray.push({
|
|
7556
|
+
behavior,
|
|
7557
|
+
priority
|
|
7558
|
+
}), previousPriority = priority;
|
|
7559
|
+
}
|
|
7560
|
+
const coreBehaviorsConfig = coreBehaviorsConfigArray;
|
|
7548
7561
|
function createEditorSnapshot({
|
|
7549
7562
|
converters,
|
|
7550
7563
|
editor,
|