• Transforms a given input code snippet into HTML using the given mode

    Parameters

    • input: string

      Code snippet

    • mode: string | SyntaxMode

      String specifying the mode to load such as ace/mode/javascript or, a mode loaded from /ace/mode (use 'ServerSideHiglighter.getMode').

    • theme: string | Theme

      String specifying the theme to load such as ace/theme/twilight or, a theme loaded from /ace/theme.

    • lineStart: number

      A number indicating the first line number. Defaults to 1.

    • disableGutter: boolean

      Specifies whether or not to disable the gutter. true disables the gutter, false enables the gutter. Defaults to false.

    • Optionalcallback: Function

      When specifying the mode or theme as a string, this method has no return value and you must specify a callback function. The callback will receive the rendered object containing the properties html and css.

    Returns object

    An object containing the properties html and css.