
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
edit-element
Advanced tools
A lightweight and flexible JavaScript/TypeScript library for adding in-place editing functionality to HTML elements.
A lightweight and flexible JavaScript/TypeScript library for adding in-place editing functionality to HTML elements.
npm install edit-element
import { EditElement } from 'edit-element';
// Make all elements with .editable class in-place editable
const editableElements = new EditElement('.editable');
import EditElement from 'edit-element';
// Make all elements with .editable class editable
const editableElements = new EditElement('.editable', {
onEnter: (element) => {
console.log('Editing started', element);
},
onSubmit: (element) => {
console.log('Edit submitted', element.textContent);
},
onLeave: (element) => {
console.log('Editing ended', element);
},
editingElementClassName: 'editing',
submitKey: 'Enter',
});
Options Interface| Property | Type | Required | Default | Description |
|---|---|---|---|---|
onEnter | (element: HTMLElement) => void | Optional | undefined | Callback function when editing starts |
onSubmit | (element: HTMLElement) => void | Optional | undefined | Callback function when edit is submitted |
onLeave | (element: HTMLElement) => void | Optional | undefined | Callback function when editing ends |
editingElementClassName | string | Optional | undefined | CSS class name added during editing |
submitKey | string | Optional | 'Enter' | Key to trigger submission |
destroyAllEditable()Remove all editable elements.
editableElements.destroyAllEditable();
destroyTargetEditable(selector: string)Remove all editable elements by matching the specific querySelector query.
editableElements.destroyTargetEditable('.specific-editable');
MIT License
Issues and pull requests are welcome!
FAQs
A lightweight and flexible JavaScript/TypeScript library for adding in-place editing functionality to HTML elements.
We found that edit-element demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.