Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 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 (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-24T06:43:55.000Z (over 2 years ago)
- Last Synced: 2024-10-05T08:36:49.287Z (4 months ago)
- Topics: in-place, in-place-editor, inplace, inplace-edit
- Language: JavaScript
- Homepage: https://www.danca.com
- Size: 104 KB
- Stars: 14
- Watchers: 4
- 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
[![CI](https://github.com/wbotelhos/inplace/workflows/CI/badge.svg)](https://github.com/wbotelhos/inplace/actions)
[![Gem Version](https://badge.fury.io/rb/inplace.svg)](https://badge.fury.io/rb/inplace)
[![Maintainability](https://api.codeclimate.com/v1/badges/564bb28fc6575ef992dc/maintainability)](https://codeclimate.com/github/wbotelhos/inplace/maintainability)
[![Sponsor](https://img.shields.io/badge/sponsor-%3C3-green)](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' });
```