editorOf

fun editorOf(document: Document, config: FormConfig = FormConfig.Default, identity: IdentityGenerator = IdentityGenerator.default, onError: ErrorHandler = NoOpErrorHandler): DocumentEditor

Creates a new DocumentEditor for the given document using a FormConfig.

Parameters

document

The document to edit (mutations write through to this instance).

config

Unified configuration (mode, events, display, pages, functions, ...).

identity

Identity generator used when creating new items/rows.

onError

Error handler invoked on evaluation/validation errors.


fun editorOf(json: JsonObject, config: FormConfig = FormConfig.Default, identity: IdentityGenerator = IdentityGenerator.default, onError: ErrorHandler = NoOpErrorHandler): DocumentEditor

Creates a new DocumentEditor for the given json using a FormConfig.


fun editorOf(map: MutableMap<String, Any?>, config: FormConfig = FormConfig.Default, identity: IdentityGenerator = IdentityGenerator.default, onError: ErrorHandler = NoOpErrorHandler): DocumentEditor

Creates a new DocumentEditor from the given map using a FormConfig.


fun editorOf(json: String, config: FormConfig = FormConfig.Default, identity: IdentityGenerator = IdentityGenerator.default, onError: ErrorHandler = NoOpErrorHandler): DocumentEditor

Creates a new DocumentEditor from the given json string using a FormConfig.


fun editorOf(bytes: ByteArray, config: FormConfig, identity: IdentityGenerator = IdentityGenerator.default, onError: ErrorHandler = NoOpErrorHandler): DocumentEditor

Creates a new DocumentEditor from raw JSON bytes using a FormConfig.


fun editorOf(document: Document, validateSchema: Boolean = true, identity: IdentityGenerator = IdentityGenerator.default, layout: LayoutConfig = LayoutConfig.convenientMobile(), functions: ResolutionResourceBuilder.() -> Unit? = null, onError: ErrorHandler = NoOpErrorHandler, onChange: DocumentEditor.(ChangeEvent) -> Unit? = null): DocumentEditor

Deprecated

Use editorOf(document, config) instead.

Replace with

editorOf(document, FormConfig.Deafult.copy(), identity, onError)

fun editorOf(json: JsonObject, validateSchema: Boolean = true, identity: IdentityGenerator = IdentityGenerator.default, layout: LayoutConfig = LayoutConfig.convenientMobile(), functions: ResolutionResourceBuilder.() -> Unit? = null, onError: ErrorHandler = NoOpErrorHandler, onChange: DocumentEditor.(ChangeEvent) -> Unit? = null): DocumentEditor
fun editorOf(json: String, validateSchema: Boolean = true, identity: IdentityGenerator = IdentityGenerator.default, layout: LayoutConfig = LayoutConfig.convenientMobile(), functions: ResolutionResourceBuilder.() -> Unit? = null, onError: ErrorHandler = NoOpErrorHandler, onChange: DocumentEditor.(ChangeEvent) -> Unit? = null): DocumentEditor

Deprecated

Use editorOf(json, config) instead.

Replace with

editorOf(json, FormConfig.Deafult.copy(), identity, onError)

fun editorOf(map: MutableMap<String, Any?>, validateSchema: Boolean = true, identity: IdentityGenerator = IdentityGenerator.default, layout: LayoutConfig = LayoutConfig.convenientMobile(), functions: ResolutionResourceBuilder.() -> Unit? = null, onError: ErrorHandler = NoOpErrorHandler, onChange: DocumentEditor.(ChangeEvent) -> Unit? = null): DocumentEditor

Deprecated

Use editorOf(map, config) instead.

Replace with

editorOf(map, FormConfig.Deafult.copy(), identity, onError)

fun editorOf(bytes: ByteArray, validateSchema: Boolean = true, identity: IdentityGenerator = IdentityGenerator.default, layout: LayoutConfig = LayoutConfig.convenientMobile(), functions: ResolutionResourceBuilder.() -> Unit? = null, onError: ErrorHandler = NoOpErrorHandler, onChange: DocumentEditor.(ChangeEvent) -> Unit? = null): DocumentEditor

Deprecated

Use editorOf(bytes, config) instead.

Replace with

editorOf(bytes, FormConfig.Deafult.copy(), identity, onError)