Skip to content

Commit

Permalink
Update editor state on depth change
Browse files Browse the repository at this point in the history
  • Loading branch information
kdblocher committed Aug 6, 2023
1 parent e9a4c2e commit 3c93821
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import {
eq,
monoid,
number,
option,
ord,
readonlyArray,
Expand Down Expand Up @@ -55,6 +56,10 @@ const eqContentBlock = monoid.concatAll(eq.getMonoid<ContentBlock>())([
string.Eq,
eq.contramap((b) => b.getText())
),
pipe(
number.Eq,
eq.contramap((b) => b.getDepth())
),
]);
const getBlocks = (editorState: EditorState) =>
pipe(
Expand Down

0 comments on commit 3c93821

Please sign in to comment.