Skip to content

Commit 64cb7cc

Browse files
committed
More README fixes
Hm.
1 parent 202a95a commit 64cb7cc

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ The Swift package URL is: `https://github.com/ZeeZide/CodeEditor.git`
4040

4141
### Using it in a SwiftUI App
4242

43-
To use the code editor as a Viewer, simply pass the source code
43+
To use `CodeEditor` as a source code viewer, simply pass the source code
44+
as a string:
4445
```swift
4546
struct ContentView: View {
4647

@@ -50,7 +51,7 @@ struct ContentView: View {
5051
}
5152
```
5253

53-
If it should act as an actual editor, pass it `Binding`:
54+
If it should act as an actual editor, pass in a string `Binding`:
5455

5556
```swift
5657
struct ContentView: View {
@@ -65,7 +66,8 @@ struct ContentView: View {
6566

6667
### Languages and Themes
6768

68-
Highlight.js supports more than 180 languages and over 80 different themes.
69+
[Highlight.js](https://highlightjs.org).
70+
supports more than 180 languages and over 80 different themes.
6971

7072
The available languages and themes can be accessed using:
7173
```swift
@@ -115,6 +117,19 @@ WindowGroup {
115117
To persist the size, the `fontSize` binding is available.
116118

117119

120+
### Highlightr and Shaper
121+
122+
Based on the excellent [Highlightr](https://github.com/raspu/Highlightr).
123+
This means that it is using JavaScriptCore as the actual driver. As
124+
Highlightr says:
125+
126+
> It will never be as fast as a native solution, but it's fast enough to be
127+
> used on a real time editor.
128+
129+
The editor is similar to (but not exactly the same) the one used by
130+
[SVG Shaper for SwiftUI](https://zeezide.de/en/products/svgshaper/),
131+
for its SVG and Swift editor parts.
132+
118133
### Who
119134

120135
SVGWebView is brought to you by [ZeeZide](https://zeezide.de).

Sources/CodeEditor/CodeEditor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Highlightr
2222
* }
2323
* }
2424
*
25-
* If it should act as an actual editor, pass it `Binding`:
25+
* If it should act as an actual editor, pass in a `Binding`:
2626
*
2727
* struct ContentView: View {
2828
*

0 commit comments

Comments
 (0)