From the NannyMUD documentation

LAST CHANGE

2006-09-22

NAME

        edit - Simple interactive input.

FUNCTIONS

OTHER FUNCTIONS

        edit

DESCRIPTION

        INTRODUCTION
        This object provides a very simple editor. It is aimed at the
        various situations were multi-line input is given by players,
        and where the builtin editor 'ed' is not suitable.

        The idea is that you have an object which provides a command.
        In the command code, you clone this object, and call the
        start_edit() (described below).

        Commands ae given first on a line. The editor supports the
        following commands:
        >H        Write a help text.
        >?        As >H.
        >I file   Include text from 'file'.
        >I> file  As >I, but prepend lines with '>'.
        >K        Remove last line.
        >Kx       Remove line number x.
        >L        Show text so far.
        >LP       Show paste text.
        >P        Paste the paste buffer into text.
        >P>       As >P, but prepend text with '>'.
        >Q        Abort.
        >Sx,y     Swap lines x and y.
        .         End writing.
        **        As '.'.

FUNCTION


NAME

        start_edit - Start interactive input.

SYNTAX

        varargs int start_edit(string callback,
                               string prompt,
                               int max_chars,
                               int max_lines,
                               string *paste_buffer,
                               int no_help)

DESCRIPTION

        You call this funcion to start gathering the player input.

        The arguments are as follows:
        
        callback
        The name of the function, in the calling object, which will be
        called when the editing is done. The argument to the callback
        funcion will be the resulting text.

        prompt
        The prompt that is written first at all lines while editing.
        If not given, ']' will be used.

        max_chars
        The maximum number of characters that are allowed in the
        final text. This includes newlines. The default is 800.

        max_lines
        The maximum number of lines that are allowed in the final
        text. The default is 10.

        paste_buffer
        An array of newline-terminated strings that are to be used
        for the paste-operation.

        no_help
        Prevent the initial help message from being displayed.