Classes
Methods
-
static defaultFilter(nodeName, attrs) → {Map|null}
-
Default filter method (does nothing).
Parameters:
Name Type Description nodeNameString The nodeName of the element
attrsMap Map of key-value pairs that are attributes of the node.
Returns:
Map | null -The allowed attributes or null, if the element should be filtered.
-
static domToType(element, _documentnullable, hooksopt, filteropt, bindingnullable) → {YXmlElement|YXmlText|false}
-
Creates a Yjs type (YXml) based on the contents of a DOM Element.
Parameters:
Name Type Attributes Default Description elementElement | Text The DOM Element
_documentDocument <nullable>
Optional. Provide the global document object
hooksObject.<string, any> <optional>
{} Optional. Set of Yjs Hooks
filterDomFilter <optional>
defaultFilter Optional. Dom element filter
bindingDomBinding <nullable>
Warning: This property is for internal use only!
Returns:
YXmlElement | YXmlText | false
Type Definitions
-
DomFilter(nodeName, attrs) → {Map|null}
-
Parameters:
Name Type Description nodeNamestring attrsMap.<string, string> Returns:
Map | null -
DomFilter(nodeName, attrs) → {Map|null}
-
Parameters:
Name Type Description nodeNamestring attrsMap.<string, string> Returns:
Map | null -
FilterFunction(nodeName, attrs) → {Map|null}
-
A filter defines which elements and attributes to share. Return null if the node should be filtered. Otherwise return the Map of accepted attributes.
Parameters:
Name Type Description nodeNamestring attrsMap Returns:
Map | null