{"id":15166990,"url":"https://github.com/avaloniaui/avaloniaedit","last_synced_at":"2026-02-05T10:12:48.847Z","repository":{"id":39995386,"uuid":"89069592","full_name":"AvaloniaUI/AvaloniaEdit","owner":"AvaloniaUI","description":"Avalonia-based text editor (port of AvalonEdit)","archived":false,"fork":false,"pushed_at":"2024-09-12T14:23:30.000Z","size":2343,"stargazers_count":760,"open_issues_count":59,"forks_count":148,"subscribers_count":35,"default_branch":"master","last_synced_at":"2024-10-29T14:35:25.738Z","etag":null,"topics":["avalonia","code-editor","editor","netstandard","text-editor"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AvaloniaUI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-22T12:54:31.000Z","updated_at":"2024-10-29T01:00:54.000Z","dependencies_parsed_at":"2023-12-01T06:24:43.636Z","dependency_job_id":"f5ca7b5a-da1f-4b50-a6ca-18e2576609e8","html_url":"https://github.com/AvaloniaUI/AvaloniaEdit","commit_stats":{"total_commits":830,"total_committers":52,"mean_commits":"15.961538461538462","dds":0.6578313253012048,"last_synced_commit":"5652803bf5d8750bc8a2ca7766d74964ce706ff5"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaloniaUI%2FAvaloniaEdit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaloniaUI%2FAvaloniaEdit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaloniaUI%2FAvaloniaEdit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AvaloniaUI%2FAvaloniaEdit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AvaloniaUI","download_url":"https://codeload.github.com/AvaloniaUI/AvaloniaEdit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509221,"owners_count":20950232,"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":["avalonia","code-editor","editor","netstandard","text-editor"],"created_at":"2024-09-27T05:21:07.754Z","updated_at":"2025-10-08T19:55:33.689Z","avatar_url":"https://github.com/AvaloniaUI.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![downloads](https://img.shields.io/nuget/dt/avalonia.AvaloniaEdit)](https://www.nuget.org/packages/Avalonia.AvaloniaEdit)\n[![Current stable version](https://img.shields.io/nuget/v/Avalonia.AvaloniaEdit.svg)](https://www.nuget.org/packages/Avalonia.AvaloniaEdit)\n# AvaloniaEdit\n\nThis project is a port of [AvalonEdit](https://github.com/icsharpcode/AvalonEdit), a WPF-based text editor for [Avalonia](https://github.com/AvaloniaUI/Avalonia).\n\nAvaloniaEdit supports features like:\n\n  * Syntax highlighting using [TextMate](https://github.com/danipen/TextMateSharp) grammars and themes.\n  * Code folding.\n  * Code completion.\n  * Fully customizable and extensible.\n  * Line numeration.\n  * Display whitespaces EOLs and tabs.\n  * Line virtualization.\n  * Multi-caret edition.\n  * Intra-column adornments.\n  * Word wrapping.\n  * Scrolling below document.\n  * Hyperlinks.\n\n  and many,many more!\n  \nAvaloniaEdit currently consists of 2 packages\n  * [Avalonia.AvaloniaEdit](https://www.nuget.org/packages/Avalonia.AvaloniaEdit) well-known package that incudes text editor itself.\n  * [AvaloniaEdit.TextMate](https://www.nuget.org/packages/AvaloniaEdit.TextMate/) package that adds TextMate integration to the AvaloniaEdit.\n\n## Getting started\n\n ### How to set up a new project that displays an AvaloniaEdit editor?\n* Create an [empty Avalonia application](https://docs.avaloniaui.net/docs/getting-started).\n* Add a the [nuget reference](https://www.nuget.org/packages/Avalonia.AvaloniaEdit/#versions-body-tab) to the latest version:\n`\u003cPackageReference Include=\"Avalonia.AvaloniaEdit\" Version=\"x.y.z.t\" /\u003e`\n* Include the *needed styles* into your `\u003cApplication.Styles\u003e` in your `App.xaml`:\n  ```xaml\n  \u003cApplication xmlns=\"https://github.com/avaloniaui\"\n               xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n               x:Class=\"MyAvaloniaApplication.App\"\n               RequestedThemeVariant=\"Default\"\u003e\n    \u003cApplication.Styles\u003e\n      \u003cFluentTheme /\u003e\n\n      \u003c!-- AvaloniaEdit styles (required!) --\u003e\n      \u003cStyleInclude Source=\"avares://AvaloniaEdit/Themes/Fluent/AvaloniaEdit.xaml\" /\u003e\n\n    \u003c/Application.Styles\u003e\n  \u003c/Application\u003e\n  ```\n  * If you're using `0.10.x.y` based versions, include `\u003cStyleInclude Source=\"avares://AvaloniaEdit/AvaloniaEdit.xaml\" /\u003e`\n  * If you're `11.x.y` based versions, include `\u003cStyleInclude Source=\"avares://AvaloniaEdit/Themes/Fluent/AvaloniaEdit.xaml\" /\u003e`\n* Finally, add the AvaloniaEdit editor into your window:\n    ```xaml\n    \u003cWindow xmlns=\"https://github.com/avaloniaui\"\n            ...\n            xmlns:AvaloniaEdit=\"clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit\"\n            ...\u003e\n      ...\n      \u003cAvaloniaEdit:TextEditor Text=\"Hello AvaloniaEdit!\"\n                               ShowLineNumbers=\"True\"\n                               FontFamily=\"Cascadia Code,Consolas,Menlo,Monospace\"/\u003e\n      ...\n    \u003c/Window\u003e\n    ```\n\nYou can see the [Demo Application](https://github.com/AvaloniaUI/AvaloniaEdit/tree/master/src/AvaloniaEdit.Demo) as a reference.\n\n ### How to set up TextMate theme and syntax highlighting for my project?\nFirst of all, if you want to use grammars supported by [TextMateSharp](https://github.com/danipen/TextMateSharp), should install the following packages:\n- [AvaloniaEdit.TextMate](https://www.nuget.org/packages/AvaloniaEdit.TextMate/) \n- [TextMateSharp.Grammars](https://www.nuget.org/packages/TextMateSharp.Grammars/) \n \nAlternatively, if you want to support your own grammars, you just need to install the AvaloniaEdit.TextMate package, and implement IRegistryOptions interface, that's currently the easiest way in case you want to use AvaloniaEdit with the set of grammars different from in-bundled TextMateSharp.Grammars.\n```csharp\n//First of all you need to have a reference for your TextEditor for it to be used inside AvaloniaEdit.TextMate project.\nvar _textEditor = this.FindControl\u003cTextEditor\u003e(\"Editor\");\n\n//Here we initialize RegistryOptions with the theme we want to use.\nvar  _registryOptions = new RegistryOptions(ThemeName.DarkPlus);\n\n//Initial setup of TextMate.\nvar _textMateInstallation = _textEditor.InstallTextMate(_registryOptions);\n\n//Here we are getting the language by the extension and right after that we are initializing grammar with this language.\n//And that's all 😀, you are ready to use AvaloniaEdit with syntax highlighting!\n_textMateInstallation.SetGrammar(_registryOptions.GetScopeByLanguageId(_registryOptions.GetLanguageByExtension(\".cs\").Id));\n```\n  \n![avaloniaedit-demo](https://user-images.githubusercontent.com/501613/169226248-946e716d-dea3-4c6d-9ae9-6148b2a51f03.gif)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaloniaui%2Favaloniaedit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favaloniaui%2Favaloniaedit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaloniaui%2Favaloniaedit/lists"}