Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vizir/ng-contenteditable
Use ngModel and validations with contenteditable HTML5 attribute
https://github.com/vizir/ng-contenteditable
angular angular-components angular-directives angularjs contenteditable
Last synced: 16 days ago
JSON representation
Use ngModel and validations with contenteditable HTML5 attribute
- Host: GitHub
- URL: https://github.com/vizir/ng-contenteditable
- Owner: Vizir
- License: mit
- Created: 2015-10-31T12:28:22.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-03-16T05:18:52.000Z (almost 6 years ago)
- Last Synced: 2024-12-16T04:18:34.814Z (about 1 month ago)
- Topics: angular, angular-components, angular-directives, angularjs, contenteditable
- Language: JavaScript
- Homepage: http://vizir.github.io/ng-contenteditable/
- Size: 76.2 KB
- Stars: 11
- Watchers: 2
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ng-content-editable
This is a slightly extended fork of the npm package [ng-content-editable](https://www.npmjs.com/package/ng-content-editable).
### Demo
You can tryout **ng-content-editable** [here](https://vizir.github.io/ng-contenteditable/).### Getting Started
Download the package, and include the `dist/ng-content-editable.min.js` file in your page.```bash
npm install ng-content-editable --save
```Then add the content-editable module to your Angular App file, e.g.
```js
var app = angular.module('app', ["content-editable"]);
```### Usage
```html
```### Description of optional attributes
| Attribute | Description| Example |
| :------------- | :-------------| :----- |
| ng-maxlength | The max-length for the attribute | 255 |
| ng-minlength | The min-length for the attribute | 3 |
| only-text | Remove all the html tags for the attribute value | true or false |
| convert-new-lines | Convert all `
`, `` and `
` to `\r\n` | true or false |
| only-num | Allow numbers 0-9, `.` and `,` only | true or false |
| no-lf | Line breaks not allowed, results in single line | true or false |
| no-trim | Disable default trim (removes whitespace from both ends of a string) | true or false |### Contributing
It's easy for you to make a contribution, just open a PR on GitHub :)
But if this will be your first contribution to a JavaScript project, below are some steps that are useful during development.
Install the dev dependencies:
```bash
npm install
```Generate the dist files:
```bash
npm run build
```