Coder Social home page Coder Social logo

aceview's Introduction

ACEView

Use the wonderful ACE editor in your Cocoa applications.

ACEView example

For great justice.

Documentation

Full API documentation.

Usage

Using ACEView is about as easy as it gets. First add the ACEView framework to your project (see linking library or framework for information on how to do this), then add a view to your XIB, and tell it to be an ACEView:

*note that ACEView has some dependencies - either use CocoaPods or run: git submodule update --init --recursive inside the folder you cloned ACEView into.

ACEView XIB

Make sure you've got an IBOutlet in your view controller, and bind that bad girl:

ACEView XIB Binding

Now, you could do something like this:

#import "Cocoa/Cocoa.h"
#import "ACEView/ACEView.h"

@interface AppDelegate : NSObject <NSApplicationDelegate, ACEViewDelegate> {
    IBOutlet ACEView *aceView;
}

@property (assign) IBOutlet NSWindow *window;

@end

#import "AppDelegate.h"
#import "ACEView/ACEView.h"
#import "ACEView/ACEModeNames.h"
#import "ACEView/ACEThemeNames.h"

@implementation AppDelegate

- (void) applicationDidFinishLaunching:(NSNotification *)aNotification {

    // Note that you'll likely be using local text
    [aceView setString:[NSString stringWithContentsOfURL:[NSURL URLWithString:@"https://github.com/faceleg/ACEView"] encoding:NSUTF8StringEncoding
                                                   error:nil]];
    [aceView setDelegate:self];
    [aceView setMode:ACEModeHTML];
    [aceView setTheme:ACEThemeXcode];
    [aceView setShowInvisibles:YES];
}

- (void) textDidChange:(NSNotification *)notification {
    NSLog(@"%s", __PRETTY_FUNCTION__);
}

@end

githalytics.com alpha

Bitdeli Badge

aceview's People

Contributors

aquarhead avatar basuke avatar bitdeli-chef avatar faceleg avatar fjaeger avatar hallski avatar hkrish avatar microtherion avatar prudnikov avatar

Stargazers

 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.