Code editor component for Universal Dashboard.
The code editor component allows you to host the Microsoft Monaco editor within your dashboards.
You can create a new code editor with the New-UDCodeEditor
cmdlet. Specifying the -Language
parameter will enable syntax highlighting for that language. You will need to specify a height in pixels.
Use the -Code
parameter to specify code that will be populated within the code editor when it loads.
You can retrieve code from another component using the Get-UDElement
cmdlet and accessing the code property of the hashtable that is returned.
You can set code from another component using the Set-UDElement
cmdlet. Specify the code value in a hashtable passed to the -Properties
parameter.
The documentation is for an upcoming feature of PowerShell Universal .
The Monaco editor supports a wide range of options. If you wish to use options that aren't available on the New-UDCodeEditor
cmdlet, you can use the -Options
parameter and pass a hashtable of options instead.
For a full list of options, check the IEditorConsturctionOptions interface.