-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathcode-editor.ps1
More file actions
18 lines (13 loc) · 728 Bytes
/
code-editor.ps1
File metadata and controls
18 lines (13 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Import-Module Pode -MaximumVersion 2.99.99 -Force
Import-Module ..\src\Pode.Web.psm1 -Force
Start-PodeServer -StatusPageExceptions Show {
# add a simple endpoint
Add-PodeEndpoint -Address localhost -Port 8090 -Protocol Http
New-PodeLoggingMethod -Terminal | Enable-PodeErrorLogging
# set the use of templates, and set a login page
Initialize-PodeWebTemplates -Title 'Code Editor' -Logo '/pode.web-static/images/icon.png' -Theme Dark
$codeEditor = New-PodeWebCodeEditor -Language Html -Name 'Code Editor' -AsCard -Value '<p style="color:white;">well</p>' -Upload {
$WebEvent.Data | Out-Default
}
Add-PodeWebPage -Name 'Home' -Path '/' -HomePage -NoAuth -Content $codeEditor -NoTitle
}