# CodeViewer **Repository Path**: yikogd/CodeViewer ## Basic Information - **Project Name**: CodeViewer - **Description**: CodeViewer - **Primary Language**: Swift - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-15 - **Last Updated**: 2021-07-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CodeViewer

platform

CodeViewer is a custom code editor SwiftUI view, which wrap around the [ace](http://ace.c9.io) editor.

image image

## Features - [x] Darkmode, lightmode adopt automatically - [x] Syntax highlighting for over 110 languages (TextMate/Sublime Text.tmlanguage files can be imported) - [x] Over 20 themes (TextMate/Sublime Text .tmtheme files can be imported) - [x] Support SwiftUI ## Usage ```Swift import SwiftUI import CodeViewer struct ContentView: View { @State private var json = "" var body: some View { CodeViewer( content: $json, mode: .json, darkTheme: .solarized_dark, lightTheme: .solarized_light, isReadOnly: true, fontSize: 54 ) .onAppear { json = """ { "hello": "world" } """ } } } ``` ## Requirement - iOS >= v13 - macOS >= v10.15