An open API service indexing awesome lists of open source software.

https://github.com/unitech/ng-wysiwyg

you shouldn't use it for now
https://github.com/unitech/ng-wysiwyg

Last synced: 9 months ago
JSON representation

you shouldn't use it for now

Awesome Lists containing this project

README

          

# Moleskin

Usable with jQuery and Angular

- 34kb - 2 files to include (and jQuery)
- multi inclusion
- autogrow
- markdown to html
- html to markdown

## Quick start

### Angular

```html

```

Don't forget to inject module.

```
var MoleskinExample = angular.module('MoleskinExample', ['MoleskineModule']);
```

Example in example/angular/index.html

### jQuery

```html

$(document).ready(function() {
el = $('.rte1').moleskine({
width : 800,
height : 500,
defaultMode : 'markdown',
onChange : function(err, data) {
console.log(data);
}
});
});

```

Example in example/jquery/index.html

## API

### Angular

```javascript
scope : {
bindData : '=',
width : '@',
height : '@',
input : '@',
output : '@',
defaultMode : '@',
autoGrow : '@'
},
```

### jQuery

```javascript
this.width = options.width || $(textarea).width() || '100%';
this.height = options.height || $(textarea).height() || 350;
this.change = this.onChange = options.change || function() {};
this.output = options.output || null;
this.input = options.input || null;
this.defaultMode = options.defaultMode || 'html';
this.autoGrow = options.autoGrow || true;
this.mode = 'html';
```

## Build

```bash
$ grunt compile
```

## Ideas

- Localstorage (in case of refresh)

# LICENSE

MIT