Module: json-editor

Simple JSON editor component.

Source:

Example

<JsonEditor />

Methods

(computed) style()

Sets style of the component

Source:

(function) data()

Method data
Source:

(method) alignWithPreviousIndentation(event) → {void}

Aligns the current line's indentation with the previous line's indentation when the tab key is pressed.

Parameters:
Name Type Description
event Event

The keyboard event triggered by pressing the tab key.

Source:
Returns:
Type
void

(method) focus()

Focuses the JSON editor.

Source:

(method) handleComponentBlur(event)

Handles the blur event of the component.

Parameters:
Name Type Description
event Event

The blur event.

Source:

(method) inputHandler()

Method inputHandler
Source:

(method) insertSuggestion()

Method insertSuggestion
Source:

(method) onKeyDown(jsonString)

Displays JSON in a formatted way.

Parameters:
Name Type Description
jsonString string

The JSON string to format.

Source:

(method) parse()

Parses the JSON string.

Source:

(method) stringify()

Stringifies the JSON string.

Source:

(method) updateIcon(value)

Updates the icon.

Parameters:
Name Type Description
value string

The value to update.

Source:

(method) updateJson(event)

Updates the JSON string.

Parameters:
Name Type Description
event Event

The input event.

Source:

(function) mounted()

Initializes the component.

Source: