CodeMirror-Swift is a lightweight wrapper of CodeMirror for macOS and iOS.
The easiest way to use this package is to add https://github.com/ProxymanApp/CodeMirror-Swift
to your SPM dependency.
CodeMirrorWebView.swift
and CodeMirrorView.bundle
to your project.index.html
mode
and Content
let url = Bundle.main.url(forResource: "data", withExtension: "json")!
let content = try! String(contentsOf: url)
codeMirrorView.setMimeType("application/json")
codeMirrorView.setContent(content)
./examples/CodeMirror-Swift-Example.xcodeproj
index.html
Sources/CodeMirrorView.bundle/Contents/Resources/theme
index.html
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.
link |
Stars: 101 |
Last commit: 1 year ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics