{"id":15059970,"url":"https://github.com/eligamii/monaco","last_synced_at":"2026-01-02T12:06:24.442Z","repository":{"id":207987553,"uuid":"719723242","full_name":"eligamii/Monaco","owner":"eligamii","description":"A WinUI3 wrapper for the Monaco Editor","archived":false,"fork":false,"pushed_at":"2023-11-19T21:32:09.000Z","size":12123,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T04:12:53.715Z","etag":null,"topics":["monaco-editor","winappsdk","winui3"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eligamii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-16T19:08:02.000Z","updated_at":"2024-07-29T17:33:25.000Z","dependencies_parsed_at":"2023-11-18T23:31:07.296Z","dependency_job_id":null,"html_url":"https://github.com/eligamii/Monaco","commit_stats":null,"previous_names":["eligamii/monaco"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eligamii%2FMonaco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eligamii%2FMonaco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eligamii%2FMonaco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eligamii%2FMonaco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eligamii","download_url":"https://codeload.github.com/eligamii/Monaco/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681084,"owners_count":20330155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["monaco-editor","winappsdk","winui3"],"created_at":"2024-09-24T22:50:37.035Z","updated_at":"2026-01-02T12:06:24.368Z","avatar_url":"https://github.com/eligamii.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monaco - A Monaco Editor wrapper for WinUI3/WinAppSDK apps\n\n### Usage\n\n* Clone this repository\n  \n* Add `Monaco.csprog` to your solution project\n  \n* Add a reference to the `Monaco` project for every project in you want to use the monaco editor\n  \n\n### Example code\n_See [LightCode](https://github.com/eligamii/LightCode) and the Odyssey browser's Additional DevTools (soon) for real uses_\n\n    XAML\n    \u003c!-- Add this to your Page, Window or anything to have access to the editor --\u003e\n    xmlns:monaco=\"using:Monaco\"\n    \u003c!-- ... --\u003e\n    \n    \u003c!-- Set the editor language in xaml with StartingLanguage, the only editor property --\u003e\n    \u003cmonaco:Editor StartingLanguage=\"CSharp\"/\u003e\n    \n    \n    C#\n    using Monaco;\n    using Monaco.Helpers; // For js string convertion\n    ...;\n    \n    // Set the editor language\n    // It's the only thing you can do in the editor before the Loaded event\n    // And this can be used only before the Loaded event\n    editor.StartingLanguage = Monaco.Language.CSharp; \n    \n    editor.Loaded += (sender, args) =\u003e\n    {\n        // Open a file\n        await editor.OpenFileAsync(\"C:\\file.cs\", detectLanguage: false);\n    \n        // Get or set text\n        string text = editor.GetTextAsync();\n        editor.SetText(\"this is some text\");\n    \n        // Set the language \n        // 80+ languages are supported in Monaco Editor but only JS, JSON, and HTML seem to have Intellisence\n        // Will add Intellisence for other languages in the future\n        editor.SetLanguage(Monaco.Language.JavaScript)\n    \n        // Save to a file\n        editor.SaveAsync(\"C:\\file.txt\");\n        // Save to the file opened with editor.OpenFileAsync()\n        editor.SaveAsync();\n    \n        // Set the editor theme\n        // ElementTheme.Light = vs theme, ElementTheme.Dark = vs-dark theme\n        editor.RequestedTheme = ElementTheme.Light;\n    \n        // Control anything in the Monaco Editor with this\n        // The example below do the same as the Editor.GetTextAsync()\n        // See what you can do with this at https://microsoft.github.io/monaco-editor/docs.html\n        string res = await editor.ExecuteAsJSAsync($\"editor.getValue()\"); // Should return \"this is some text\" here\n        Debug.WriteLine(res);\n    }\n    \n    //  Text changed event\n    editor.TextChanged += (sender, text) =\u003e Debug.WriteLing(text);\n    \n    // Link clicked event (if no code is set for this event, the link will open in the default browser)\n    editor.LinkClicked += (sender, url) =\u003e Debug.WriteLine(url.ToString());\n    \n\n\n\n### Credit\n\n* Microsoft for WebView2 and the Windows App SDK\n  \n* The [Monaco Editor](https://github.com/microsoft/monaco-editor) [team](https://github.com/microsoft/monaco-editor/graphs/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feligamii%2Fmonaco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feligamii%2Fmonaco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feligamii%2Fmonaco/lists"}