Variable DefaultProcessorsConst

DefaultProcessors: {
    bracketProcessor: (() => InputProcessor);
    newlineProcessor: ((opts: Partial<NewlineProcessorOptions>) => InputProcessor);
    tabProcessor: ((opts: Partial<TabProcessorOptions>) => InputProcessor);
} = ...

Default Input Processors

These are the default InputProcessor implementations used by the editor.

If you create your own input processor, you can still incorporate these processors into your own processor. Please see InputProcessor for more information about Input Processors in general.

Type declaration

  • bracketProcessor: (() => InputProcessor)
      • (): InputProcessor
      • Bracket Processor

        The default bracket processor. This processor is responsible for automatically inserting closing brackets. It also handles "skipping over" closing brackets if they are already present.

        Returns

        A configured keydown processor.

        Returns InputProcessor

  • newlineProcessor: ((opts: Partial<NewlineProcessorOptions>) => InputProcessor)
      • (opts: Partial<NewlineProcessorOptions>): InputProcessor
      • Newline Processor

        The default newline processor.

        This processor is used to handle the enter key. When the enter key is pressed, this processor will insert a new line and optionally indent the new line appropriately. Sometimes it adjusts the indentation up or down depending on the context. It's important to note that this processor always inserts a new line. This is done because FireFox handles the enter key differently than other browsers. In FireFox, the enter key inserts a
        tag instead of a new line. This processor is used to normalize the behavior across all browsers.

        Returns

        A configured newline processor.

        Parameters

        Returns InputProcessor

  • tabProcessor: ((opts: Partial<TabProcessorOptions>) => InputProcessor)

Generated using TypeDoc