Swiftpack.co - ProxymanApp/CodeMirror-Swift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
CodeMirror-Swift is a lightweight wrapper of CodeMirror for macOS and iOS
.package(url: "https://github.com/ProxymanApp/CodeMirror-Swift.git", from: "1.0.0")
GitHub screenshot GitHub

CodeMirror-Swift is a lightweight wrapper of CodeMirror for macOS and iOS.


  • 🍭 Lightweight CodeMirror wrapper (build 5.52.2)
  • βœ… 100% Native Swift 5 and modern WKWebView
  • πŸ‘‘ Support iOS & macOS
  • 🎧 Built-in addons
  • πŸ”Ž Customizable (Addon, Themes, Modes...)
  • πŸ“• Dozen built-in themes and syntax highlight modes
  • ⚑️ Ready to go

Apps that uses CodeMirror-Swift

Proxyman screenshot

Modern and Delightful HTTP Debugging Proxy for macOS, iOS and Android ⚑️ β€’ 🌎 https://proxyman.io



The easiest way to use this package is to add https://github.com/ProxymanApp/CodeMirror-Swift to your SPM dependency.


  1. Manually copy CodeMirrorWebView.swift and CodeMirrorView.bundle to your project.
  2. Customize to fit your need on index.html
  3. Set mode and Content
let url = Bundle.main.url(forResource: "data", withExtension: "json")!
let content = try! String(contentsOf: url)


  • Run ./examples/CodeMirror-Swift-Example.xcodeproj

How to use addons?

  1. Read CodeMirror Documentation
  2. Enable your plugins in index.html

How to add new themes?

  1. Download CodeMirrror themes and put it on the folder Sources/CodeMirrorView.bundle/Contents/Resources/theme
  2. Load your theme in index.html
  3. Change by using codeMirrorView.setThemeName("material.css")



CodeMirror-Swift is copyright 2020 Proxyman and available under MIT license. See the LICENSE file in the project for more information.


Stars: 60
Last commit: 1 week ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

CodeMirror-Swift 1.0.0 βœ…
49 weeks ago


  • Stable build for CodeMirror-Swift

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics