Skip to content

Broadcast parent-side line-text edits to active tool iframes #565

Description

@thehabes

Surfaced during testing of the 5-2-tools-align cut (PR #564). The parent transcription-block does not broadcast text-input changes to the active tool iframe, so iframe tools that display line text (notably Preview-Transcription) show only the values fetched at boot, plus values they themselves sent via UPDATE_LINE_TEXT. Edits typed directly into the parent stay invisible to the tool until reload.

This is a pre-existing gap, not introduced by #564. Deferred so the contract-standardization PR stays focused on standardization.

Proposed shape

Extend the parent → tool contract with one new message:

{ type: 'LINE_TEXT_UPDATED', lineId: '<URI>', text: '<string>' }

Wire transcription-block's input-change handler (around the existing markLineDirty / scheduleLineSave sites in components/transcription-block/index.js) to call simple-transcription's #postToTool with the new message. The active iframe's #activeToolIframe is already tracked in simple-transcription.

Companion work

Preview-Transcription needs a corresponding inbound handler. Tracked separately so each repo carries its own commit.

Companion issue

CenterForDigitalHumanities/Preview-Transcription#7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions