ProsemirrorEx.Transform.ReplaceAroundStep (prosemirror_ex v0.3.0)

Copy Markdown View Source

Replace a part of the document with a slice of content, but preserve a range of the replaced content by moving it into the slice.

Ports ReplaceAroundStep from prosemirror-transform/src/replace_step.ts.

Summary

Types

t()

@type t() :: %ProsemirrorEx.Transform.ReplaceAroundStep{
  from: non_neg_integer(),
  gap_from: non_neg_integer(),
  gap_to: non_neg_integer(),
  insert: non_neg_integer(),
  slice: ProsemirrorEx.Model.Slice.t(),
  structure: boolean(),
  to: non_neg_integer()
}

Functions

new(from, to, gap_from, gap_to, slice, insert, structure \\ false)

Create a new ReplaceAroundStep.