Code Monkey home page Code Monkey logo

aceview's Introduction

ACEView

Build Status Join the chat at https://gitter.im/faceleg/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

Contributions

All are welcome, all are read.

Here is a list of the honorable humans who have submitted fixes, features and time to this great cause:

  • Michael Robinson
  • Matthias Neeracher
  • Mikael Hallendal
  • Ashok Gelal
  • Tim Preuß
  • Vincent Wayne
  • Vladimir Prudnikov
  • AquarHEAD L
  • Basuke Suzuki
  • Conor Taylor
  • Fabian Jäger
  • Harikrishnan Gopalakrishnan

aceview's People

Contributors

aquarhead avatar ashokgelal avatar basuke avatar bitdeli-chef avatar faceleg avatar fjaeger avatar gitter-badger avatar hallski avatar hkrish avatar microtherion avatar prudnikov avatar sveinbjornt avatar taylorconor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aceview's Issues

Example app building

I wasn't able to build the example app without first having to find an "emmit" and "ace" project. I couldn't find those but I did find the compiled app in the package, however I had to add the framework manually into the bundle.

That would be nicer if it built out of the box for easy testing because on a lazier day I may have skipped this really cool project. Thanks man!

'ACEView/ACERange.h' file not found

I add the framework, I add the ACEView folder, then this I add to the folder the Dependencies, but if I build the app I get this error!

'ACEView/ACERange.h' file not found

Change font size does not work

No matter what value you give to setFontSize it does not do anything.
Is there any special settings that needs to be performed before calling this method?

Create next tag/podspec?

Hi... great library, easy to use and fast... thanks!

It seems like there have been a pretty decent amount of updates since the 0.0.4 release. Do you think you're ready to create a 0.0.5 release and push it to cocoapods? In particular, I'd like to use the setReadOnly method, but I'm sure there's some other good stuff in there since the last reason too.

Keep up the good work!

API to determine if content is non-conforming

Hello,

I haven't seen an ACEView/ACEViewDelegate API to determine if the content of the view are not conforming to the specified language. For example, if I set the ACEView mode to be ACEModeJSON and I edit the contents removing a comma, a red "X" appears in the gutter (awesome!). I'd love to programmatically figure out if the view is showing one or more "X"'s so that I can redraw the rest of the UI accordingly. Did I overlook this API somewhere? Thanks!

NO Objective-C and Swift syntax modes

This library is great but it misses Objective-C and Swift syntax modes.
I know it depends on ace-builds to add support, but would be great to figure something out.

Printing does not work

I would like to implement printing in my ACEView using app, but for some reason, only a frame gets printed (this behavior is exhibited by the example app as well).

I'm somewhat puzzled by this, as WebViews as such certainly should be printable, and if I load e.g. the ace kitchen sink demo http://ace.c9.io/build/kitchen-sink.html into a WebView, it prints just fine.

Find and click location issue

When find bar is visible (that is when you press Command-F) clicking location is wrong. You can test this very simple by making the find bar visible and then trying to select a word by double clicking.

Find Panel does not work

Hey guys, I see that there is textfinder support and implementation in the ACEView class, and that the main ACEView class is a scrollview that wraps a webview. So in theory it should support FindBar.

However it does not. I tried it both in the Example application, and in my application, in both cases the find doesn't show up.

I stepped through the code a little bit, and it looks like it is being set up, and some of the methods are getting called.

However the find bar doesn't show. And in the Edit Menu under find options they are all greyed out.

I am basically using the code as is from the Readme.

Any thoughts or ideas? Is there some trick or method call that is missing?

This is a great Framework thanks for putting it together.

-John

FInd panel not working

Although ACEView implements the NSTextFinderClient protocol, I am unable to get search functionality via the standard Find... menu item in the Edit menu. Looks like it isn't responding to performFindPanelAction. Anything I can do to fix this and get Find to work?

Can Not Subclass

I can't seem to subclass AceView. When i try to do so, the view appears blank white.

This not compile at all

I download the code, open xcode 4, run the demo, and complain can't compile. The project miss a lot of files and have other errors...

Remove ACERange

ACE will implmenent a bunch of NSRange/NSIndex-like functionality (ajaxorg/ace#1162), which hopefully means ACERange and related code can be removed, instead using ACE's new native functionality.

The ACEView project is broken

Hi,

The project has broken dependencies (i.e. ACEView > Dependencies > ace is empty). Cloning the project or saving it as ZIP reveals lots of missing files.

-- Tito

Replace is broken

When you enter find and replace. All is good the first time. After you click the first time on "Replace" button, then the selection in ace is offset. Replacing after that will just replace wrong text.

I'm investigating for a fix, but if you have a faster idea of what might be wrong please let me know.

Drag And Drop Replaces Contents

Dragging anything a webView accepts causes the editor to be replaced with the dragged item.

Drag and drop operations should be either disabled or overridden to accept only text files and set the content of the editor instead of the webView.

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.