platform-bible-react
    Preparing search index...

    Interface FootnoteEditorHandleExperimental

    What a host can ask an inline FootnoteEditor to do directly, rather than through props.

    This type is unstable and may change shape or disappear without notice

    interface FootnoteEditorHandle {
        containsFocus: () => boolean;
        flushPendingEdits: () => void;
        focus: () => void;
    }
    Index

    Properties

    containsFocus: () => boolean

    Whether DOM focus is anywhere in this editor - its note text or its own controls. Reads the document's active element, so it stays true while the window itself is not focused.

    flushPendingEdits: () => void

    Applies to the parent editor whatever inline edit is still sitting inside the live-apply debounce, right now.

    A host that ends an editing session must call this BEFORE tearing its own bookkeeping down. Unmounting this component flushes too, but that happens a commit later, by which time the host no longer recognizes the apply as the session's own tail — and a note replacement that arrives unattributed is indistinguishable from a newly inserted note. A no-op when nothing is pending or the note is unchanged.

    focus: () => void

    Puts DOM focus back in the note text, on the caret the editor last held.