Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/model/modifier/RichTextEditorUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,28 +210,11 @@ const RichTextEditorUtil = {

event.preventDefault();

// Only allow indenting one level beyond the block above, and only if
// the block above is a list item as well.
var blockAbove = content.getBlockBefore(key);
if (!blockAbove) {
return editorState;
}

var typeAbove = blockAbove.getType();
if (
typeAbove !== 'unordered-list-item' &&
typeAbove !== 'ordered-list-item'
) {
return editorState;
}

var depth = block.getDepth();
if (!event.shiftKey && depth === maxDepth) {
return editorState;
}

maxDepth = Math.min(blockAbove.getDepth() + 1, maxDepth);

var withAdjustment = adjustBlockDepthForContentState(
content,
selection,
Expand Down