Trevixal API
    Preparing search index...

    Image uploads bound to an editor: drag-and-drop, paste, and the ImageController.pickFiles file dialog all funnel through the same pipeline, compress, validate, insert a placeholder node, upload, then patch the node with the real URL.

    The placeholder is tracked by its uploadId attribute rather than a position, so it survives arbitrary edits (and disappears cleanly if the user deletes it mid-upload).

    Index
    • get uploadsInFlight(): number

      Returns number

    • Cancel a running upload and remove its placeholder.

      Parameters

      • id: string

      Returns void

    • Returns void

    • Insert an image that is already hosted somewhere.

      Parameters

      • attrs: { alt?: string; src: string; title?: string }

      Returns boolean

    • Open the OS file picker and upload everything chosen.

      Returns void

    • Rotate a quarter turn anticlockwise.

      Parameters

      • Optionalat: Path

      Returns Promise<boolean>

    • Rotate a quarter turn clockwise.

      Parameters

      • Optionalat: Path

      Returns Promise<boolean>

    • Rotate, flip or crop the image under the selection (or at at), re-upload the new pixels and point the node at them.

      The edit is destructive on purpose: a CSS rotation only exists inside this editor, while new bytes survive export, copy-paste and every other reader. Everything lands in a single transaction labelled for the history, so one undo puts back both the old URL and the old dimensions.

      Parameters

      Returns Promise<boolean>

    • Validate and upload files, inserting one image node per accepted file.

      Parameters

      • files: readonly File[]

      Returns Promise<void>