ProsemirrorEx.Transform.MapResult (prosemirror_ex v0.3.0)

Copy Markdown View Source

An object representing a mapped position with extra information.

Ports MapResult from prosemirror-transform/src/map.ts.

Summary

Functions

Bitmask constant for deletion across.

Bitmask constant for deletion after.

Bitmask constant for deletion before.

Bitmask constant for deletion on the queried side.

Tells you whether the position was deleted, that is, whether the step removed the token on the side queried (via the assoc argument) from the document.

Tells whether any of the steps mapped through deletes across the position (including both the token before and after the position).

True when the token after the mapped position was deleted.

Tells you whether the token before the mapped position was deleted.

Types

t()

@type t() :: %ProsemirrorEx.Transform.MapResult{
  del_info: non_neg_integer(),
  pos: non_neg_integer(),
  recover: non_neg_integer() | nil
}

Functions

del_across()

Bitmask constant for deletion across.

del_after()

Bitmask constant for deletion after.

del_before()

Bitmask constant for deletion before.

del_side()

Bitmask constant for deletion on the queried side.

deleted?(map_result)

@spec deleted?(t()) :: boolean()

Tells you whether the position was deleted, that is, whether the step removed the token on the side queried (via the assoc argument) from the document.

deleted_across?(map_result)

@spec deleted_across?(t()) :: boolean()

Tells whether any of the steps mapped through deletes across the position (including both the token before and after the position).

deleted_after?(map_result)

@spec deleted_after?(t()) :: boolean()

True when the token after the mapped position was deleted.

deleted_before?(map_result)

@spec deleted_before?(t()) :: boolean()

Tells you whether the token before the mapped position was deleted.