Class JSONEditor

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(container: HTMLElement, options?: JSONEditorOptions, json?: any): JSONEditor

Parameters

Returns

JSONEditor

Properties

public Events: { addEventListener(element: HTMLElement, action: string, listener: (event?: Event) => void, useCapture: boolean): (event?: Event) => void; removeEventListener(element: HTMLElement, action: string, listener: (event?: Event) => void, useCapture: boolean): void; stopPropagation(event: Event): void; preventDefault(event: Event): void; }

public addEventListener(): (event?: Event) => void

Returns

(event?: Event) => void

.action.action: string

.element.element: HTMLElement

.listener.listener: (event?: Event) => void

.useCapture.useCapture: boolean

public preventDefault()

.event.event: Event

public removeEventListener()

.action.action: string

.element.element: HTMLElement

.listener.listener: (event?: Event) => void

.useCapture.useCapture: boolean

public stopPropagation()

.event.event: Event

public History: JSONEditorHistory

public Node: JSONEditorNode

public SearchBox: JSONEditorSearchBox

public static focusNode: JSONEditorNode

public static freezeHighlight: boolean

public number: any

Methods

public static addClassName(elem: HTMLElement, className: string)

Parameters

  • elem: HTMLElement
  • className: string

public clear()

public collapseAll()

public expandAll()

public focus()

public get(): Object

Returns

Object

public static getAbsoluteLeft(elem: HTMLElement): number

Parameters

  • elem: HTMLElement

Returns

number

public static getAbsoluteTop(elem: HTMLElement): any

Parameters

  • elem: HTMLElement

Returns

any

public static getInnerText(element: HTMLElement, buffer: JSONEditorBuffer): string

Parameters

Returns

string

public static getInternetExplorerVersion(): number

Returns

number

public getName(): string

Returns

string

public static getNodeFromTarget(target: HTMLElement): JSONEditorNode

Parameters

  • target: HTMLElement

Returns

JSONEditorNode

public onAction(action: string, params: JSONEditorActionParams): any

Parameters

Returns

any

public static parse(jsonString: string): Object

Parameters

  • jsonString: string

Returns

Object

public static removeClassName(elem: HTMLElement, className: string)

Parameters

  • elem: HTMLElement
  • className: string

public scrollTo(top: number)

Parameters

  • top: number

public search(text: string): Array<any>

Parameters

  • text: string

Returns

Array<any>

public set(json: Object, name?: string)

Parameters

  • json: Object
  • name?: string optional

public static setEndOfContentEditable(contentEditableElement: HTMLElement)

Parameters

  • contentEditableElement: HTMLElement

public setName(name?: string)

Parameters

  • name?: string optional

public static showDropDownList(params: any)

Parameters

  • params: any

public static stripFormatting(divElement: HTMLElement)

Parameters

  • divElement: HTMLElement

public static validate(jsonString: string): string

Parameters

  • jsonString: string

Returns

string