penguin-inplace

0.0.3 • Public • Published

penguin-inplace

Installation

$ npm i -S penguin-inplace

Then edit your package.json file to include the component.

{
  "penguin": {
    "components": {
      "Inplace": "penguin-inplace"
    }
  }
}

Usage

<div data-component='Inplace' data-props='{"field":"simple-span-label"}'>
  <strong>My default content</strong>
</div>

This component uses contenteditable to make the target element editable and decodes all HTML by using innerText to set the content. The static part simply renders the innerHTML of the element.

Props

  • field - Specifies the field to modify in the state

Package Sidebar

Install

npm i penguin-inplace

Weekly Downloads

0

Version

0.0.3

License

MIT

Last publish

Collaborators

  • domachine