https://github.com/wbotelhos/inplace
:pencil2: Inplace - An inplace editor
https://github.com/wbotelhos/inplace
in-place in-place-editor inplace inplace-edit
Last synced: 2 months ago
JSON representation
:pencil2: Inplace - An inplace editor
- Host: GitHub
- URL: https://github.com/wbotelhos/inplace
- Owner: wbotelhos
- License: mit
- Created: 2018-07-08T20:11:28.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-24T06:43:55.000Z (about 3 years ago)
- Last Synced: 2025-03-26T08:37:11.064Z (3 months ago)
- Topics: in-place, in-place-editor, inplace, inplace-edit
- Language: JavaScript
- Homepage: https://www.danca.com
- Size: 104 KB
- Stars: 14
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Inplace - An inplace editor
[](https://github.com/wbotelhos/inplace/actions)
[](https://badge.fury.io/rb/inplace)
[](https://codeclimate.com/github/wbotelhos/inplace/maintainability)
[](https://www.patreon.com/wbotelhos)Inplace is an tiny inplace editor to enable a quick ajax update with no need to create a form.
## Options
```js
`data-field-name`: Name of the field;
`data-field-text`: Name of the attribute of the returned JSON used to be the inplace text;
`data-field-value`: Value of the field;
`data-field-type`: Field type that can be `text` or `select`;
`data-options`: Data options setted on the field with prefix `inplace-`;
`data-url`: URL used to post the data;
```## Usage
You declare an element with optional data atributes:
```html
42
```On JS you can declare attributes too, but data attributes has priority:
```js
$('.inplace').inplace({ url: '/save' });
```