Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-content-editable

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-content-editable - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

.npmignore

26

Gruntfile.js

@@ -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'])
}

9

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc