Socket
Socket
Sign inDemoInstall

reactjs-content-editable

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    reactjs-content-editable

React content editable component


Version published
Maintainers
1
Install size
16.3 kB
Created

Readme

Source

react-content-editable

It's React component which support content editable div

Install

npm install reactjs-content-editable

Usage

import React, { useState } from 'react';
import { ContentEditable } from "reactjs-content-editable";

function App() {
  const [html, setHtml] = useState("")
  return (
    <>
      <ContentEditable 
        html={html} 
        onChange={(value: string) => setHtml(value)} 
      />
    </>
  );
}

export default App;

Available props

propdescriptiontype
htmlrequired: innerHTML of the editable elementString
disableduse true to disable editingBoolean
onChangecalled whenever innerHTML changesFunction
classNamethere is no default className are given, you can add your ownString
stylestyle properties which support react style format, by default height is set to 200pxObject
innerRefif you want to control the element, you can pass refLegacyRef

Support

If you are facing any issue, please contact via linkedin ( Libin Prasanth ).

Examples

Do you want to try react-content-editable before use ?

Donate!

Like my Work! Donate

Keywords

FAQs

Last updated on 27 Sep 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc