Formwright
    Preparing search index...

    Drives a rich-text field. Text goes in through the editor's own commands (ProseMirror doesn't react to synthetic key events); formatting goes through the toolbar, as a user's would:

    class PostForm extends FormHarness {
    @field(RichTextHarness) declare body: RichTextHarness
    }

    await form.body.typeText('Hello')
    await form.body.selectAll()
    await form.body.press('bold')
    assert.strictEqual(form.body.html, '<p><strong>Hello</strong></p>')

    Hierarchy (View Summary)

    Index
    path: string
    controls: string[]

    Control names (data-test-fw-type) this harness can drive; empty means any.

    • get control(): HTMLElement

      The element the field's

      Returns HTMLElement

    • get displayText(): string | undefined

      The inline value shown before editing (@inline forms).

      Returns string | undefined

    • Replaces the document, as pasting over all of it would; the cursor ends up at the end.

      Parameters

      • html: string

      Returns Promise<void>