Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F10352816
code-editor.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
665 B
Referenced Files
None
Subscribers
None
code-editor.ts
View Options
import
type
{
Context
}
from
"koa"
;
import
type
{
FormDataValue
}
from
"@sealcode/sealgen"
;
import
{
Controls
}
from
"@sealcode/sealgen"
;
export
class
CodeEditor
extends
Controls
.
Textarea
{
async
renderInput
(
ctx
:
Context
,
attributes
:
string
,
data
:
Record
<
string
,
FormDataValue
>
)
{
const
{
parsed
:
value
}
=
await
this
.
field
.
getValue
(
ctx
,
data
);
return
/* HTML */
` <div class="monacoEditor" data-controller="monaco">
<textarea
data-monaco-target="textarea"
cols=
${
this
.
options
.
cols
}
rows=
${
this
.
options
.
rows
}
id="monacoAlternative"
${
attributes
}
>
${
value
||
"console.log('Hello World')"
}
</textarea
>
</div>`
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sun, Nov 2, 20:55 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1030522
Default Alt Text
code-editor.ts (665 B)
Attached To
Mode
rAPROXY Assetproxy
Attached
Detach File
Event Timeline
Log In to Comment