Skip to main content

Module: actions/EditNew/runEditTargets

Functions

runEditTargets

runEditTargets(graph, editor, state): Promise<State>

Handle targets that will use an edit action to insert a new target, and return an updated state object.

We proceed by asking the targets to construct an edit where we insert an empty string, and then we place the cursor where that empty string would be. This will cause the targets to delete themselves, or insert a delimiter if they are positional.

Parameters

NameTypeDescription
graphGraphThe graph object
editorEditableTextEditorThe editor on which we're operating
stateStateThe state object tracking cursors, thatMark, etc

Returns

Promise<State>

An updated state object

Defined in

actions/EditNew/runEditTargets.ts:21