0.0.3 • Published 9 years ago
penguin-inplace v0.0.3
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