1.1.6 • Published 8 years ago

ember-json-editor-for v1.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

ember-json-editor-for

Ember component for @josdejong's JSON editor.

Installation

$ ember install ember-json-editor-for

Usage

See the demo and code.

{{!-- default use --}}
{{json-editor-for json}}

{{!-- mode is updated via DDAU --}}
{{json-editor-for json mode=mode onModeChange=(action (mut mode))}}

{{!-- use ember-component-inbound-actions for fetching JSON --}}
{{json-editor-for json actionReceiver=jsonEditorFor}}
// inside controller/component
this.get('jsonEditorFor').send('getJSON', json => { /* ...  */ })

API

Background

Please read JSON editor's docs first.

Options

This addon abstracts away some JSON editor options for cleanliness. Supported options:

OptionNotes
ace
ajv
onEditableconfiguration function
onErroruse an Ember action
onModeChangeuse an Ember action
escapeUnicode
history
mode
modesmodified default is ['tree', 'view', 'form', 'code', 'text']
name
schema
search
indentation
theme

Inbound actions

This addon uses inbound actions to mirror JSON editor's methods and to avoid editor jumpiness. Supported inbound actions:

UsageDescription
.send('collapseAll')collapses JSON editor when in tree, view, or form mode
.send('expandAll')expands JSON editor when in tree, view, or form mode
.send('focus')set focus on JSON editor
.send('getJSON', json => { /* ... */ })fetch JSON

Badges

npm.io npm.io


GitHub @nucleartide  ·  Twitter @nucleartide

1.1.6

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago