penguin-inplace
v0.0.3
Published
A simple contenteditable component for penguin.
Maintainers
Readme
penguin-inplace
Installation
$ npm i -S penguin-inplaceThen 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
