Binding
Direct Subclass:
Abstract class for bindings.
A binding handles data binding from a Yjs type to a data object. For example,
you can bind a Quill editor instance to a YText instance with the QuillBinding
class.
It is expected that a concrete implementation accepts two parameters (type and binding target).
Example:
const quill = new Quill(document.createElement('div'))
const type = y.define('quill', Y.Text)
const binding = new Y.QuillBinding(quill, type)
Constructor Summary
Public Constructor | ||
public |
constructor(type: YType, target: any) |
Member Summary
Public Members | ||
public |
target: * The target that |
|
public |
type: YType The Yjs type that is bound to |
Method Summary
Public Methods | ||
public |
destroy() Remove all data observers (both from the type and the target). |
Public Constructors
public constructor(type: YType, target: any) source
Params:
Name | Type | Attribute | Description |
type | YType | Yjs type. |
|
target | any | Binding Target. |