
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.
react-editable-elements
Advanced tools
Components and hooks to build a WYSIWYG editor. In edition mode (through editorContext), each element can be edited.
npm install --save react-editable-elements
import * as React from 'react'
import { field, useEditableText, editorContext, withEditorContext } from 'react-editable-elements'
const Example = () => {
const { toggleEditionMode } = useContext(editorContext)
const exampleText = useEditableText(initValue, handleUpdate)
function handleUpdate(data){
// Here you can update your database (or anything you want)
}
return (
<div>
<button onClick={toggleEditionMode}>Toggle edition mode</button>
<field.p {...exampleText}>
</div>
)
}
export default withEditorContext(Example)
Note : react-editable-elements is currently under development
available elements :
field.h1
field.h2
field.h3
field.h4
field.h5
field.h6
field.p
field.img
incoming elements :
field.table
hX have to be used with useInlineText(defaultValue, updateCallback)
p has to be used with useEditableText(defaultValue, updateCallback)
img have to be used with useDroppableImage(defaultValue, updateCallback)
const Component = () => {
const background = useDroppableBackground(defaultImage, handleUpdate)
function handleUpdate(data){
// Here you can update your database (or anything you want)
}
return (
<div style={{
...background.style
}}
{...background.handlers}
>
Hello world
</div>
)
}
Then, in edit mode, just drop your image. She'll be displayed and the handleUpdate callback will be called with the image (File object) in argument.
MIT © anthonyjeamme
FAQs
>
We found that react-editable-elements 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
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.