Frontmatter
| id | 8070 |
| title | Enhance MonacoEditor validation and LivePreview language mapping |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Dec 9, 2025, 4:13 PM |
| updatedAt | Dec 9, 2025, 4:27 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8070 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 9, 2025, 4:27 PM |
Enhance MonacoEditor validation and LivePreview language mapping
tobiu assigned to @tobiu on Dec 9, 2025, 4:17 PM

tobiu
Dec 9, 2025, 4:25 PM
Input from Gemini Agent:
✦ I have completed the implementation for this enhancement.
Changes:
Neo.component.wrapper.MonacoEditor:
- Added
static languages = ['javascript', 'markdown'].- Implemented
beforeSetLanguageto validate input against the allowed languages.Neo.code.LivePreview:
- Updated
afterSetLanguageto map'neomjs'to'javascript'before passing the configuration to the child editor component.- This leverages
getItem()'s ability to modify uninstantiated config objects, ensuring the correct language is set during initialization.The code changes have been pushed directly to the repository.
tobiu closed this issue on Dec 9, 2025, 4:27 PM
Improve language handling in
Neo.component.wrapper.MonacoEditorandNeo.code.LivePreview.Neo.component.wrapper.MonacoEditor:
static languages = ['javascript', 'markdown'].beforeSetLanguageto validate the value against thestatic languagesarray usingbeforeSetEnumValue.Neo.code.LivePreview:
afterSetLanguage, map the local language value'neomjs'to'javascript'before passing it to the embeddedMonacoEditorcomponent.'neomjs'->'javascript''markdown'->'markdown'This keeps
MonacoEditoragnostic of the'neomjs'term while ensuring valid language configuration.