Socket
Socket
Sign inDemoInstall

inplace

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    inplace

Inplace is an tiny inplace editor to enable a quick ajax update with no need to create a form.


Version published
Weekly downloads
13
decreased by-51.85%
Maintainers
1
Install size
1.20 MB
Created
Weekly downloads
 

Readme

Source

Inplace - An inplace editor

Build Status NPM Version Dependency Dev Dependency Code Climate Support

Inplace is an tiny inplace editor to enable a quick ajax update with no need to create a form.

Options

`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:

<div
  class="inplace"
  data-attributes='{ "maxlength": 2 }'
  data-field-name="number"
  data-field-value="42"
  data-url="/update"
>42</div>

On JS you can declare attributes too, but data attributes has priority:

$('.inplace').inplace({ url: '/save' });

Keywords

FAQs

Last updated on 05 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc