Ace API Reference
    Preparing search index...

    Module src/ext/prompt

    Provides customizable modal prompts for gathering user input with support for autocompletion, validation, and specialized input types. Includes built-in prompt types for navigation (goto line), command palette, and mode selection, with extensible architecture for custom prompt implementations.

    Built-in Prompt Types:

    • gotoLine: Navigate to specific line numbers with selection support
    • commands: Command palette with searchable editor commands and shortcuts
    • modes: Language mode selector with filtering capabilities

    Usage:

    // Basic prompt
    prompt(editor, "Default value", {
    placeholder: "Enter text...",
    onAccept: (data) => console.log(data.value)
    });

    // Built-in prompts
    prompt.gotoLine(editor);
    prompt.commands(editor);
    prompt.modes(editor);

    Interfaces

    PromptOptions

    Type Aliases

    Editor

    Functions

    prompt