{"id":31055174,"url":"https://github.com/jaywcjlove/swiftui-codemirror","last_synced_at":"2025-10-12T16:07:41.391Z","repository":{"id":309405600,"uuid":"1036175666","full_name":"jaywcjlove/swiftui-codemirror","owner":"jaywcjlove","description":"SwiftUI wrapper for CodeMirror 6.","archived":false,"fork":false,"pushed_at":"2025-09-18T14:52:00.000Z","size":1326,"stargazers_count":16,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T06:43:54.794Z","etag":null,"topics":["codemirror","codemirror6","ios","jaywcjlove","macos","swift-package-manager","swiftui","swiftui-component"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/jaywcjlove.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"ko_fi":"jaywcjlove","buy_me_a_coffee":"jaywcjlove","custom":["https://www.paypal.me/kennyiseeyou","https://jaywcjlove.github.io/#/sponsor"]}},"created_at":"2025-08-11T17:07:23.000Z","updated_at":"2025-09-18T14:52:04.000Z","dependencies_parsed_at":"2025-08-11T19:17:10.128Z","dependency_job_id":"1b21d20d-8892-431b-a4c5-c69e243a4b5c","html_url":"https://github.com/jaywcjlove/swiftui-codemirror","commit_stats":null,"previous_names":["jaywcjlove/swiftui-codemirror"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/jaywcjlove/swiftui-codemirror","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-codemirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-codemirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-codemirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-codemirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaywcjlove","download_url":"https://codeload.github.com/jaywcjlove/swiftui-codemirror/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-codemirror/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011983,"owners_count":26085039,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["codemirror","codemirror6","ios","jaywcjlove","macos","swift-package-manager","swiftui","swiftui-component"],"created_at":"2025-09-15T04:03:43.527Z","updated_at":"2025-10-12T16:07:41.385Z","avatar_url":"https://github.com/jaywcjlove.png","language":"Swift","funding_links":["https://ko-fi.com/jaywcjlove","https://buymeacoffee.com/jaywcjlove","https://www.paypal.me/kennyiseeyou","https://jaywcjlove.github.io/#/sponsor"],"categories":["UI and SwiftUI"],"sub_categories":[],"readme":"\u003cdiv markdown=\"1\"\u003e\n  \u003csup\u003eUsing \u003ca href=\"https://wangchujiang.com/#/app\" target=\"_blank\"\u003emy app\u003c/a\u003e is also a way to \u003ca href=\"https://wangchujiang.com/#/sponsor\" target=\"_blank\"\u003esupport\u003c/a\u003e me:\u003c/sup\u003e\n  \u003cbr\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/VidCrop/6752624705\" title=\"VidCrop for macOS\"\u003e\u003cimg align=\"center\" alt=\"VidCrop\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/91d2b281-271a-4107-9ef6-f3b11bd6dbac\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/Vidwall/6747587746\" title=\"Vidwall for macOS\"\u003e\u003cimg align=\"center\" alt=\"Vidwall\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/7b5df70a-ed91-4d4b-85be-f00e60a09ce9\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/mousio-hint/\" title=\"Mousio Hint for macOS\"\u003e\u003cimg align=\"center\" alt=\"Mousio Hint\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/3c0af128-0cef-44e5-a8db-4741dc5a6690\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6746747327\" title=\"Mousio for macOS\"\u003e\u003cimg align=\"center\" alt=\"Mousio\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/9edf61ff-5a6c-4676-9cc2-8fd3c1ad0dfb\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6745227444\" title=\"Musicer for macOS\"\u003e\u003cimg align=\"center\" alt=\"Musicer\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/b7abfba8-88ff-4c86-a125-43073d5aef22\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6743841447\" title=\"Audioer for macOS\"\u003e\u003cimg align=\"center\" alt=\"Audioer\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/7a836865-8c90-4119-87bc-19e06a76c957\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6744690194\" title=\"FileSentinel for macOS\"\u003e\u003cimg align=\"center\" alt=\"FileSentinel\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/28bce2cc-290e-45bf-9068-585ff6ecafe9\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6743495172\" title=\"FocusCursor for macOS\"\u003e\u003cimg align=\"center\" alt=\"FocusCursor\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/d543668a-737b-4853-a6bb-eaa269e69836\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6742680573\" title=\"Videoer for macOS\"\u003e\u003cimg align=\"center\" alt=\"Videoer\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/10ffb0f1-0625-40d6-93f1-2c2496592595\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6740425504\" title=\"KeyClicker for macOS\"\u003e\u003cimg align=\"center\" alt=\"KeyClicker\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/5a19fcb9-cb81-4855-b4ea-31c604d9612a\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6739052447\" title=\"DayBar for macOS\"\u003e\u003cimg align=\"center\" alt=\"DayBar\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/771b608d-594c-492d-8532-d9231e383f5b\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6739444407\" title=\"Iconed for macOS\"\u003e\u003cimg align=\"center\" alt=\"Iconed\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/8a35dc7b-4faf-4e2a-9311-f66d6844a896\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6737160756\" title=\"RightMenu Master for macOS\"\u003e\u003cimg align=\"center\" alt=\"RightMenu Master\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/39a76541-71bf-4de7-a01c-c62f0557dff5\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6723903021\" title=\"Paste Quick for macOS\"\u003e\u003cimg align=\"center\" alt=\"Quick RSS\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/bdaad5b7-9810-44ce-8f17-8410864465d2\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6670696072\" title=\"Quick RSS for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"Quick RSS\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/374106b5-a448-4d1d-9ccb-b04b6bc681ed\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6670167443\" title=\"Web Serve for macOS\"\u003e\u003cimg align=\"center\" alt=\"Web Serve\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/e1d9f76f-0f3d-4ba5-8a15-253ee173bb1c\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6503953628\" title=\"Copybook Generator for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"Copybook Generator\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/b90e42ff-158b-4534-82ca-5898fd0e8d73\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6471227008\" title=\"DevTutor for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"DevTutor for SwiftUI\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/f15c154d-0192-48eb-8e0e-9e245ffd974a\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6479819388\" title=\"RegexMate for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"RegexMate\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/aabe5aa9-9a96-4390-8bed-c3e4023d0dea\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6479194014\" title=\"Time Passage for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"Time Passage\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/time-passage/assets/1680273/6f30e429-e6f3-4dbe-9921-a5effe2a05e9\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6478772538\" title=\"IconizeFolder for macOS\"\u003e\u003cimg align=\"center\" alt=\"Iconize Folder\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/fa9d8b9c-1e51-4ded-877c-fa5b21c47220\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6478511402\" title=\"Textsound Saver for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"Textsound Saver\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/0595e842-980b-4574-8891-a8ba853a08be\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6476924627\" title=\"Create Custom Symbols for macOS\"\u003e\u003cimg align=\"center\" alt=\"Create Custom Symbols\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/8cd022ce-a3f1-4e89-b7c6-6fbd0d4db77c\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6476452351\" title=\"DevHub for macOS\"\u003e\u003cimg align=\"center\" alt=\"DevHub\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/4a44a4fd-67ce-430b-af0a-72f18feaa47d\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6476400184\" title=\"Resume Revise for macOS\"\u003e\u003cimg align=\"center\" alt=\"Resume Revise\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c9954a20-1905-48de-bdf8-d71837974aa2\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6472593276\" title=\"Palette Genius for macOS\"\u003e\u003cimg align=\"center\" alt=\"Palette Genius\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/27340413-d355-45b2-8f6f-6ac37682d957\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/6470879005\" title=\"Symbol Scribe for macOS\"\u003e\u003cimg align=\"center\" alt=\"Symbol Scribe\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c7249f05-fa70-4def-a1e9-571d5f171fc9\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\u003chr\u003e\n\nCodeMirror\n===\n\n![CodeMirror for macOS/iOS](https://github.com/user-attachments/assets/2d25564c-bb2b-4297-a4c5-1db03d13a5ce)\n\nSwiftUI wrapper for CodeMirror 6.\n\n## Features\n\n- Minimal and fast\n- Handles large documents with ease\n- [40+ themes](https://uiwjs.github.io/react-codemirror/#/theme) available\n- macOS \u0026 iOS support\n- Built with SwiftUI\n\n## Installation\n\n### Swift Package Manager\n\nAdd CodeMirror to your project using Xcode:\n\n1. In Xcode, go to `File` → `Add Package Dependencies...`\n2. Enter the repository URL: `https://github.com/jaywcjlove/swiftui-codemirror.git`\n3. Click `Add Package`\n\nOr add it to your `Package.swift` file:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/jaywcjlove/swiftui-codemirror.git\", from: \"1.0.0\")\n]\n```\n\n## Usage\n\n### CodeMirror\n\n```swift\nimport SwiftUI\nimport CodeMirror\n\nstruct ContentView: View {\n    @State var value: String = \"\"\n    var body: some View {\n        CodeMirror(value: $value, prompt: String(localized: \"Please enter text\"))\n        CodeMirror(value: $value)\n            .onLoadSuccess() {\n                print(\"Hello!\")\n            }\n            .onLoadFailed { error in\n                print(\"@@@2 \\(#function) \\(error)\")\n            }\n            .onContentChange { value in\n                print(\"@@@3 Content Did Change\")\n            }\n    }\n}\n```\n\n**Set Line Wrapping**\n\n```swift\nstruct ContentView: View {\n    @State var lineWrapping = false\n    @State var value: String = \"\"\n    var body: some View {\n        CodeMirror(value: $value)\n            .cmLineWrapping($lineWrapping)\n    }\n}\n```\n\n**Show Line Numbers**\n\n```swift\nstruct ContentView: View {\n    @State var lineNumber = true\n    @State var value: String = \"\"\n    var body: some View {\n        CodeMirror(value: $value)\n            .cmLineNumber($lineNumber)\n    }\n}\n```\n\n**Show Fold Gutter**\n\n```swift\nstruct ContentView: View {\n    @State var foldGutter = false\n    @State var value: String = \"\"\n    var body: some View {\n        CodeMirror(value: $value)\n            .cmFoldGutter($foldGutter)\n    }\n}\n```\n\n**Set Editor Read-Only**\n\n```swift\nstruct ContentView: View {\n    @State var readOnly = false\n    @State var value: String = \"\"\n    var body: some View {\n        CodeMirror(value: $value)\n            .cmReadOnly($readOnly)\n    }\n}\n```\n\n**Set enabled search**\n\n```swift\nstruct ContentView: View {\n    @State var enabledSearch = false\n    @State var value: String = \"\"\n    var body: some View {\n        CodeMirror(value: $value)\n            .cmEnabledSearch(.constant(false))\n    }\n}\n```\n\n**Set Font Size**\n\n```swift\nCodeMirror(value: $value)\n    .cmFontSize(.constant(14))\n```\n\n**Set Highlight Active Line**\n\n```swift\nCodeMirror(value: $value)\n    .cmHighlightActiveLine(.constant(false))\n```\n\n**Set Programming Language**\n\n```swift\nstruct ContentView: View {\n    @State var language: Language = .json\n    @State var value: String = \"\"\n    var body: some View {\n        CodeMirror(value: $value)\n            .cmLanguage($language)\n    }\n}\n```\n\nSupport: `C`, `C++`, `CQL`, `CSS`, `Go`, `HTML`, `Java`, `JavaScript`, `JSON`, `JSX`, `LESS`, `Liquid`, `MariaDB SQL`, `Markdown`, `MS SQL`, `MySQL`, `PHP`, `PLSQL`, `PostgreSQL`, `Python`, `Rust`, `Sass`, `SCSS`, `SQL`, `SQLite`, `TSX`, `TypeScript`, `WebAssembly`, `XML`, `YAML`, `APL`, `PGP`, `ASN.1`, `Asterisk`, `Brainfuck`, `Cobol`, `C#`, `Clojure`, `ClojureScript`, `Closure Stylesheets (GSS)`, `CMake`, `CoffeeScript`, `Common Lisp`, `Cypher`, `Cython`, `Crystal`, `D`, `Dart`, `diff`, `Dockerfile`, `DTD`, `Dylan`, `EBNF`, `ECL`, `edn`, `Eiffel`, `Elm`, `Erlang`, `Esper`, `Factor`, `FCL`, `Forth`, `Fortran`, `F#`, `Gas`, `Gherkin`, `Groovy`, `Haskell`, `Haxe`, `HXML`, `HTTP`, `IDL`, `JSON-LD`, `Jinja2`, `Julia`, `Kotlin`, `LiveScript`, `Lua`, `mIRC`, `Mathematica`, `Modelica`, `MUMPS`, `Mbox`, `Nginx`, `NSIS`, `NTriples`, `Objective-C`, `Objective-C++`, `OCaml`, `Octave`, `Oz`, `Pascal`, `Perl`, `Pig`, `PowerShell`, `Properties files`, `ProtoBuf`, `Pug`, `Puppet`, `Q`, `R`, `RPM Changes`, `RPM Spec`, `Ruby`, `SAS`, `Scala`, `Scheme`, `Shell`, `Sieve`, `Smalltalk`, `Solr`, `SML`, `SPARQL`, `Spreadsheet`, `Squirrel`, `Stylus`, `Swift`, `sTeX`, `LaTeX`, `SystemVerilog`, `Tcl`, `Textile`, `TiddlyWiki`, `Tiki wiki`, `TOML`, `Troff`, `TTCN`, `TTCN_CFG`, `Turtle`, `Web IDL`, `VB.NET`, `VBScript`, `Velocity`, `Verilog`, `VHDL`, `XQuery`, `Yacas`, `Z80`, `MscGen`, `Xù`, `MsGenny`, `Vue`, `Angular Template`,\n\n**Set Theme**\n\n```swift\nstruct ContentView: View {\n    @Environment(\\.colorScheme) var colorScheme\n    @State var theme: Themes = .vscodelight\n    @State var value: String = \"\"\n    var body: some View {\n        CodeMirror(value: $value)\n            .cmTheme($theme)\n            .cmTheme(\n                colorScheme == .dark ? .constant(.vscodedark) : .constant(.vscodelight)\n            )\n    }\n}\n```\n\n### CodeMirrorView\n\n```swift\nimport SwiftUI\nimport CodeMirror\n\nstruct ContentView: View {\n    @ObservedObject var vm: CodeMirrorVM = .init()\n    @State var value: String = \"\"\n    var body: some View {\n        CodeMirrorView(vm, value: $value)\n            .onAppear {\n                vm.setContent(jsonString)\n            }\n    }\n}\n```\n\n**Set Theme**\n\n```swift\nimport SwiftUI\nimport CodeMirror\n\nstruct ContentView: View {\n    @ObservedObject var vm: CodeMirrorVM = .init()\n    @State var value: String = \"\"\n    var body: some View {\n        VStack {\n            CodeMirrorView(vm, value: $value)\n                .onAppear {\n                    vm.setContent(jsonString)\n                }\n            Picker(\"Theme\", selection: $vm.theme) {\n                ForEach(Themes.allCases, id: \\.rawValue) {\n                    Text($0.rawValue).tag($0)\n                }\n            }\n        }\n    }\n}\n```\n\n**Set Programming Language**\n\n```swift\nPicker(\"Lang\", selection: $vm.language) {\n    ForEach(Language.allCases, id: \\.rawValue) {\n        Text($0.rawValue).tag($0)\n    }\n}\n```\n\n```swift\nvm.language = .json\n```\n\n**Set Editor Content**\n\n```swift\nButton {\n    vm.setContent(\"Hello World!\")\n} label: {\n    Text(\"SET\")\n}\n```\n\n**Get Editor Text Content**\n\n```swift\nButton {\n    Task {\n        let content = try? await vm.getContent()\n        print(content ?? \"\")\n    }\n} label: {\n    Text(\"GET\")\n}\n```\n\n**Set Editor Read-Only**\n\n```swift\nToggle(isOn: $vm.readOnly, label: { Text(\"Read Only\") })\n    .toggleStyle(.checkbox)\n```\n\n**Show Line Numbers**\n\n```swift\nToolbarItem {\n    Toggle(isOn: $vm.lineNumber, label: { Text(\"Line Number\") })\n        .toggleStyle(.checkbox)\n}\n```\n\n**Set Line Wrapping**\n\n```swift\nToolbarItem {\n    Toggle(isOn: $vm.lineWrapping, label: { Text(\"Line Wrapping\") })\n        .toggleStyle(.checkbox)\n}\n```\n\n**Event**\n\n```swift\n@ObservedObject var vm: CodeMirrorVM = .init(\n    onLoadSuccess: {\n        print(\"@@@1 \\(#function)\")\n    },\n    onLoadFailed: { error in\n        print(\"@@@2 \\(#function) \\(error)\")\n    },\n    onContentChange: { value in\n        print(\"@@@3 Content Did Change\")\n    }\n)\n```\n\n## Acknowledgments\n\nThanks to these projects:\n\n- https://codemirror.net\n- https://github.com/khoi/codemirror-swift\n- https://github.com/ProxymanApp/CodeMirror-Swift\n\n## License\n\nLicensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywcjlove%2Fswiftui-codemirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaywcjlove%2Fswiftui-codemirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywcjlove%2Fswiftui-codemirror/lists"}