Class $k.ViewConfiguration
Configuration of a topic editor
- Defined in: ViewConfiguration.js
- Extends: $k.AbstractEditorConfiguration
Constructor Attributes | Constructor Name and Description |
---|---|
Method Summary
Class Detail
$k.ViewConfiguration()
Method Detail
-
<static> {object} $k.ViewConfiguration.forElement(semanticElement, context)Returns the configuration for the semantic element
- Parameters:
- {$k.SemanticElement} semanticElement
- {$k.SemanticElement} context Optional
- Context of the configuration
- Returns:
- {object} The rendered JSON object
-
Returns the confguration defined by the element
- Parameters:
- {$k.SemanticElement} configurationElement
- The configuration element
- Returns:
- {$k.ViewConfiguration}
-
{object} render(semanticElement, keyFilter)Render the element as a literal object
- Parameters:
- {$k.SemanticElement} semanticElement
- {object} keyFilter Optional
- A filter that defines which property names that are included.
{"exclude": ["key1", ...]}
includes all but the listed properties, while{"include": ["key1", ...]}
or["key1", ...]
includes only the listed properties.
Non-optional properties are always included
- Returns:
- {object} The rendered object
- See:
- $k.ViewConfiguration#synchronize
-
{object} renderJSON(semanticElement, excludeKeys)Render the element as a JavaScript object
- Deprecated:
-
Use
render(semanticElement, {"exclude": excludedKeys})
instead
- Parameters:
- {$k.SemanticElement} semanticElement
- {string[]} excludeKeys Optional
- Collection of property names that are excluded
- Returns:
- {object} The rendered JSON object
-
Update the semantic element from the JSON string / literal object
- Parameters:
- {object} object
- JSON string or literal object
- Throws:
- {$k.exception.SchemaError}
- Got an synchronisation error
- Returns:
- {$k.ViewConfiguration}
- See:
- $k.ViewConfiguration#render
-
Update the semantic element from the JSON string / literal object
- Deprecated:
-
Use
synchronize(jsonObject)
- Parameters:
- {object} jsonObject
- JSON string or literal object
- Throws:
- {$k.exception.SchemaError}
- Got an synchronisation error
- Returns:
- {$k.ViewConfiguration}