You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
│ │ ├── codeeditor.bundle.js - Main bundle (19 MB)
145
145
│ │ ├── css.worker.js - CSS language worker
@@ -194,35 +194,24 @@ Workers are loaded asynchronously and run in separate threads for better perform
194
194
195
195
### Theme System
196
196
197
-
Supports two theme formats:
197
+
Themes are loaded directly as static assets via HTTP fetch (no PHP handler required). Theme preference values include the file extension (e.g., `twilight.tmTheme`, `one-dark-pro.json`).
198
198
199
-
#### 1. TextMate Themes (.tmTheme)
200
-
Legacy XML-based themes used by Ace Editor. Converted to Monaco format at runtime using `fast-plist` library.
199
+
#### Supported Formats
201
200
202
-
```php
203
-
// CodeEditor.php
204
-
public function onLoadTheme() {
205
-
// Loads .tmTheme files and returns XML content
206
-
return ['format' => 'tmTheme', 'data' => $xml];
207
-
}
208
-
```
209
-
210
-
#### 2. JSON Themes (.json)
211
-
Modern VS Code theme format. Loaded directly without conversion.
201
+
**1. TextMate Themes (.tmTheme)**
202
+
Legacy XML-based themes. Converted to Monaco format at runtime using `fast-plist` library.
212
203
213
-
```php
214
-
// CodeEditor.php
215
-
public function onLoadTheme() {
216
-
// Loads .json files and returns JSON content
217
-
return ['format' => 'json', 'data' => $json];
218
-
}
219
-
```
204
+
**2. JSON Themes (.json)**
205
+
Modern VS Code theme format. Parsed and mapped to Monaco's theme structure.
220
206
221
207
```javascript
222
-
// index.js
223
-
convertJsonTheme(jsonContent) {
224
-
// Converts VS Code JSON theme to Monaco theme
225
-
// Maps tokenColors and UI colors
208
+
// codeeditor.js - Themes loaded via static fetch
209
+
asyncfetchTheme(themeName) {
210
+
// Theme name includes extension (e.g., "twilight.tmTheme", "one-dark-pro.json")
211
+
// Legacy values without extension default to .tmTheme
0 commit comments