Skip to content
Document Authoring DA  API Docs v2.1.0
npmGitHub

FieldTargetNEW

FieldTarget:

type FieldTarget =
| { type: "point"; point: TextInsertionPoint }
| { type: "text"; span: TextSpan };

Where FieldCollection.add puts a new field: a new, empty field at a point, or existing text made into a field.

{ type: "point"; point: TextInsertionPoint; }

type: "point"

point: TextInsertionPoint

Adds a new field, with no value yet, at this point.

{ type: "text"; span: TextSpan; }

type: "text"

span: TextSpan

Makes this existing text the field’s value.