
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Let's user click on text to edit the contents only if there is a difference and thus reduce the number of unnecessary API calls.
npm install click-edit --save
ClickEditModule
You need to Import and add the ClickEditModule
in the module of your app where you want to use it.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { ClickEditModule} from 'click-edit';
// ..
@NgModule({
// ..
imports: [
BrowserModule,
ClickEditModule
],
// ...
})
Add the clickEdit
directive to the element.
<p clickEdit (onContentChange)="onChange($event)">
Some text which will be edited.
</p>
Attribute | Type | Default | Description |
---|---|---|---|
canEdit | boolean | true | Whether the text should be editable or not. |
multiline | boolean | false | Whether pressing enter key should create a newline |
true : Enter key will not emit edited value (It will be emitted on blur). | |||
contentId | number | Whether need to reference the identifier of the change. | |
contentLabel | string | Whether need to indicate what field is being changed. | |
contentClass | string | editing | Style the element during editing using this class. |
You can listen in on when the text field contents have changed.
Event | Type | Description |
---|---|---|
onContentChange | customEvent | Fired only when the content has been successfully changed to a new value. |
This project was generated with Angular CLI version 8.3.17.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
FAQs
In Angular application, Lets user click on text to edit the contents
The npm package click-edit receives a total of 59 weekly downloads. As such, click-edit popularity was classified as not popular.
We found that click-edit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.