function injectForm(fields: FormFields<FormFieldHandle>, options?: InjectFormOptions): FormHandle; One dirty, pending and valid state over injectField handles, and a submit that writes every field before its command (createFormController in @runic-artifex/views). It needs no injection context.
readonly form = injectForm({ title: this.title, body: this.body }, { dirty: computed(() => this.editor.state()?.isDirty === true) });
// <button [disabled]="!form.valid() || form.submitting()" (click)="form.submit(() => editor.client()!.save())">Save</button>