Giter Club home page Giter Club logo

notepad's Introduction

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.

notepad's People

Contributors

ruddfawcett avatar

Watchers

Tualatrix Chou avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.