ember-inplace-edit

Ember cli addon for inplace editing

Usage no npm install needed!

<script type="module">
  import emberInplaceEdit from 'https://cdn.skypack.dev/ember-inplace-edit';
</script>

README

ember-inplace-edit npm version Build Status

This is Ember cli addon for inplace editing

Demo

Installation

  • ember install ember-inplace-edit

Released Version

Usage

This addon provides an ember-inplace-edit component.

{{ember-inplace-edit
  text=text
  value=value
  placeholder="Add Placeholder content"
  placeholderClass="placeholder div class"
  editIcon="Edit icon class, ex: fa fa-edit"
  action="saveUser"
}}

Properties

Property Description
text text to be displayed before/after editing, it can be controller property wrapping value
value value to be edited
type input/textarea (default: 'input')
disabled disable editing (default: false)
model this will be sent automatically in the action hook (optional)
autoResize If it is false then it will set the width and height of the textarea after editing started, otherwise it will change the size on the fly when you are typing if the `ember-autoresize` addon is installed (default: false)
placeholder placeholder content
placeholderClass placeholder class (optional)
editIcon Edit icon class, ex: fa fa-edit (optional)

Actions

Action Description
action action to be called after editing is done (optionally attached model and the new value will be sent as a parameter)

Events

Event Description
on-activated it fires when the input/textarea has been inserted into the DOM (params: component container, optionally attached model)