angular-content-editable
Advanced tools
Comparing version 1.0.3 to 1.1.0
@@ -5,9 +5,25 @@ module.exports = function(grunt) { | ||
pkg: grunt.file.readJSON('package.json'), | ||
concat: { | ||
dist: { | ||
src: ['src/<%= pkg.name %>.module.js', 'src/<%= pkg.name %>.*.js'], | ||
dest: 'dist/<%= pkg.name %>.js', | ||
} | ||
}, | ||
uglify: { | ||
options: { mangle: false }, | ||
options: { | ||
mangle: false | ||
}, | ||
dist: { | ||
files: { | ||
'dist/content-editable.directive.min.js': ['dist/content-editable.directive.js'] | ||
'dist/<%= pkg.name %>.min.js': ['dist/<%= pkg.name %>.js'] | ||
} | ||
} | ||
}, | ||
watch: { | ||
files: ['src/*'], | ||
tasks: ['default'], | ||
} | ||
@@ -17,4 +33,8 @@ | ||
grunt.registerTask('default', ['uglify:dist']) | ||
grunt.loadNpmTasks('grunt-contrib-concat') | ||
grunt.loadNpmTasks('grunt-contrib-uglify') | ||
grunt.loadNpmTasks('grunt-contrib-watch') | ||
grunt.registerTask('default', ['concat:dist', 'uglify:dist']) | ||
} |
{ | ||
"name": "angular-content-editable", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"description": "modify in real time any html tag you want", | ||
"main": "Gruntfile.js", | ||
"directories": { | ||
"example": "example", | ||
"test": "test" | ||
"example": "example" | ||
}, | ||
@@ -29,4 +28,6 @@ "scripts": { | ||
"grunt": "^0.4.5", | ||
"grunt-contrib-uglify": "^0.9.2" | ||
"grunt-contrib-concat": "^1.0.1", | ||
"grunt-contrib-uglify": "^0.9.2", | ||
"grunt-contrib-watch": "^1.0.0" | ||
} | ||
} |
# angular-content-editable | ||
angular directive for modify in real time any html tag you want | ||
### [DEMO](http://www.codekraft.it/demos/angular-content-editable/) | ||
## Getting started: | ||
@@ -23,3 +25,5 @@ Download the package using npm: | ||
``` | ||
--- | ||
### Directive attributes: | ||
@@ -32,6 +36,23 @@ * __single-line__: if set to true makes the enter key save and blur | ||
Note that, __edit-callback__ has two arguments: | ||
* __text__: the new text inside the element | ||
* __elem__: the element that has been modified | ||
* __text__: the new text inside the element | ||
* __elem__: the element that has been modified | ||
--- | ||
## Example basic: | ||
### Customizations: | ||
You can use the __contentEditableProvider__ to set the default settings for the directive, but you can always pass directly to the directive as attributes to override the defaults for that element. | ||
```javascript | ||
angular.module('app') | ||
.config(function(contentEditableProvider) { | ||
contentEditableProvider.configure({ | ||
singleLine: true // single line for all elements | ||
}) | ||
}) | ||
``` | ||
--- | ||
### Example basic: | ||
Simply adding the directive makes the element fully editable. | ||
@@ -64,1 +85,13 @@ ```html | ||
``` | ||
### Development: | ||
If you want to fork you copy of the project and modify it: | ||
```bash | ||
npm install npm i angular-content-editable | ||
npm install | ||
``` | ||
Than a Gruntfile is ready with this actions: | ||
```bash | ||
grunt // build the package | ||
grunt watch // watch to /src folder and rebuild the package | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
12
1
95
0
1
23489
4
402