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
- Host: GitHub
- URL: https://github.com/unitech/ng-wysiwyg
- Owner: Unitech
- Created: 2014-01-14T12:03:22.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-01-14T12:27:47.000Z (almost 12 years ago)
- Last Synced: 2025-02-10T05:24:04.844Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 238 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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