Custom
data class Custom<V>(val toJSON: (V, EditorState) -> Any?, val fromJSON: (Any?, EditorState) -> V) : FieldSerialization<V>
Deprecated
Use FieldSerialization.Serializer with a KSerializer instead.
Replace with
FieldSerialization.Serializer(serializer)Content copied to clipboard
Custom serialization with explicit toJSON and fromJSON conversion functions.
Both functions receive the EditorState for context (e.g. to resolve facets).