For the complete documentation index, see llms.txt. This page is also available as Markdown.

New-UDCodeEditor

Synopsis

Creates a new Monaco code editor control.

Syntax

New-UDCodeEditor [-Id <String>] [-Language <String>] [-Height <String>] [-Width <String>] [-HideCodeLens] [-DisableCodeFolding] [-FormatOnPaste] [-GlyphMargin] [-DisableLineNumbers] [-DisableLinks] [-DisableBracketMatching] [-MouseWheelScrollSensitivity <Int32>] [-MouseWheelZoom] [-ReadOnly] [-RenderControlCharacters] [-ShowFoldingControls <String>] [-SmoothScrolling] [-LightTheme <String>] [-DarkTheme <String>] [-Code <String>] [-Original <String>] [-CanSave] [-Extension <String>] [-HideMiniMap] [<CommonParameters>]

New-UDCodeEditor [-Id <String>] [-Language <String>] [-Height <String>] [-Width <String>] [-Code <String>] [-Original <String>] [-Options <Hashtable>] [-CanSave] [-Extension <String>] [-HideMiniMap] [<CommonParameters>]

Description

Creates a new Monaco code editor control.

Parameters

-Id

The ID of this editor

Required?                    false
Position?                    named
Default value                ([Guid]::NewGuid())
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

-Language

The language to use for syntax highlighting.

-Height

The height of the editor.

-Width

The width of the editor.

-HideCodeLens

Hides code lens within the editor.

-DisableCodeFolding

Disables code folding.

-FormatOnPaste

Formats on paste.

-GlyphMargin

Seconds the size of the glyph margin

-DisableLineNumbers

Disables line numbers

Disables automatically highlighting links.

-DisableBracketMatching

Disables bracket matching.

-MouseWheelScrollSensitivity

Sets the mouse wheel scroll sensitivity.

-MouseWheelZoom

Enables Ctrl+Scroll zooming.

-ReadOnly

Sets the editor to readonly.

-RenderControlCharacters

Enables rendering of control characters.

-ShowFoldingControls

Controls how to show the folding controls.

-SmoothScrolling

Enables smooth scrolling.

-LightTheme

The light theme for the editor.

-DarkTheme

The dark theme for the editor.

-Code

The code to show in the editor.

-Original

The original code to compare against.

-Options

A hashtable of options to apply to the editor.

-CanSave

Whether the code can be saved.

-Extension

The extension of the file.

-HideMiniMap

Hides the Monaco editor minimap and, in diff mode, the diff overview ruler. Available with both the standard options and the -Options hashtable parameter sets.

Common parameters

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.

Outputs

Examples

Example 1: Basic code editor

Creates a PowerShell code editor

Example 2: Read only code editor

Creates a read only PowerShell code editor

Example 3: Diff code editor

Creates a read only PowerShell code editor with diff enabled

Last updated

Was this helpful?