CodeEditor
Editor code (Monaco — engine giống VS Code) — dùng cho JSON / SQL / JS / C# inline.
Source:
Core/Components/CodeEditor.cs· ComType:CodeEditor
Cấu hình
ComType: CodeEditor
FieldName: Script
Row: 20
PlainText: javascript # ngôn ngữ syntax highlight
Field DB dùng
| Field | Vai trò |
|---|---|
FieldName | Property entity bind code string. |
Row | Số dòng hiển thị mặc định (chiều cao editor). |
PlainText | Tên ngôn ngữ Monaco cho syntax highlight: javascript, json, sql, csharp, html, css, … |
Style | Inline CSS cho editor container. |
Precision | Setting precision (rare). |
Events
Không fire event riêng — bind text vào entity.<FieldName>.
Khi nào dùng
- Form quản trị: edit JSON config, SQL query, JS expression, C# script.
- Field
Migration,Validation,ScriptValidationcủa Component đôi khi chứa code → dùng CodeEditor để view/edit.
Tip
PlainText= tên ngôn ngữ Monaco (javascript,json,sql,csharp,html, …).- Cần ide-style editor toàn bộ (intellisense, multi-tab) → dùng StudioCode thay vì CodeEditor.