Latest 0.2.4
Homepage https://github.com/ruddfawcett/Notepad
License MIT
Platforms ios 8.0
Authors

Notepad

Version Carthage compatible CocoaPods compatible

Usage

let notepad = Notepad(view.bounds, themeFile: "one-dark")
view.addSubview(notepad)

Notepad is just like any other UITextView, but you need to use the convenience initializer in order to use the themes. To create a new theme, copy one of the existing themes and edit the JSON.

Check out the Xcode project for an example. For full documentation read the code.

Themes

Take a look at all of the themes and swatches when choosing the theme for your Notepad, or as inspiration for a new one.

You can find all of the raw themes in the themes folder, and the file names are case-sensitive.

Custom Regex

Using regex, you can match custom patterns in your Notepad editor by passing a regex attribute in your theme. For example, one that highlights Twitter handles in a teal color:

"handle": {
  "regex": "[@@][a-zA-Z0-9_]{1,20}",
  "color": "#78ddd5"
}

Installation

Copy the source from the Notepad folder to your project, or add Notepad to your Podfile if you’re using CocoaPods.

Latest podspec

{
    "name": "Notepad",
    "version": "0.2.4",
    "summary": "A themeable Markdown editor.",
    "description": "Notepad gives your users the ability to write and edit Markdown directly in your app.nnThe editor is fully themeable with a JSON stylesheet.nnAdd it to your app with only a few lines of code.",
    "homepage": "https://github.com/ruddfawcett/Notepad",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Rudd Fawcett": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ruddfawcett/Notepad.git",
        "tag": "0.2.4"
    },
    "social_media_url": "https://twitter.com/ruddfawcett",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Notepad/*.swift",
    "resources": "Notepad/themes/*.json",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This