Constructor.
the original text node to wrap
CKEditor instance
signals, if this proxy should be mutable; trying to modify an immutable proxy will raise an error.
ReadonlyeditorRepresents the editor instance. May be used to access configuration options for example.
Mimics TextFilterParams, which helps to deal with rule processing.
ReadonlynodeRepresents the node instance. For TextProxy this is just the
proxy class itself.
Mimics TextFilterParams, which helps to deal with rule processing.
ReadonlyparentRepresents the parent rule. No-Operation rule for TextProxy.
Mimics TextFilterParams, which helps to deal with rule processing.
Returns the wrapped delegate.
This delegate should not be used for directly manipulating the DOM, as nested rules may not veto applied changes.
If a manipulation is done, it must be ensured, that previously run rules on this node may be rerun. It is generally considered safe to do manipulation to child elements, as these are processed after this node, so that all applicable rules have a chance to modify these nodes again.
Signals, if this is the last node in parent. Always false if no
parent exists.
Signals, if this element is mutable.
Retrieves the name of the node (lower case).
Access owner document.
Access to the parent element of this node.
Access to the parent node of this node.
Retrieves the name of the node (lower case).
If renaming is supported by this instance, it may differ from
name, otherwise, it is the same.
Signals, if this node is meant to be removed. This includes recursive removal (including children) as well as just removing this node (replacing it by its children).
Signals, if this mutable element represents a state, where the element shall be removed, including all its children.
It is important to note, that setting this modifies the NodeProxy#state, thus setting this overrides any other decisions upon the state of the node.
Duplicate Spaces: If you apply this modification, it may
end up having duplicate space characters in your DOM. For example if
removing the `
you will end up having:
with two white space characters in the middle. You may want to detect such
states, and remove the duplicate space. You shouldn't do this, though, if
you are within a space preserving context such as ``.
Signals, if this node represents a state, where the children of the node should be removed.
Sets, if this node represents a state, where the children of the node shall be removed.
It is important to note, that setting this modifies the NodeProxy#state, thus setting this overrides any other decisions upon the state of the node.
true to mark as remove children; false otherwise.
Signals, if this node represents a state, where the node shall be removed, while attaching the children to the parent node.
Sets, if this node represents a state, where the node shall be removed, while attaching the children to the parent node.
It is important to note, that setting this modifies the NodeProxy#state, thus setting this overrides any other decisions upon the state of the node.
true to mark as replace with children; false otherwise.
Signals, if this is the only child node at parent node.
Gets the state to reach when persisting this node to the DOM.
Gets the text content, which may be overridden.
Sets the text content. Only allowed in mutable state.
text content to set.
Apply given rules. If any of the rules will invalidate this node either by deletion or by replacing it, no further rules will be applied.
rules to apply in given order
a node, if filtering should be restarted from this node; null otherwise.
ProtectedcontinueHelper function for return value, which signals to continue with another node, but to do not abort current processing.
node to continue with
Get first (matching) child node of the given element.
Optionalcondition: string | ChildPredicatestring: the node name to match (ignoring case), predicate: the predicate to apply.
Signals, if this element is empty.
OptionalconsiderChildNode: ChildPredicatesignals, if a given node shall be considered while determining empty state
Persists the applied changes to the DOM.
ProtectedpersistFor kept text-nodes it possibly sets changed text.
ProtectedpersistPersists removal of all child nodes.
ProtectedpersistPersists the deletion of this node and all its child nodes.
ProtectedpersistPersists, that only the node itself shall be removed. The default implementation will replace the node with its child nodes.
ProtectedrequireWill raise an error, if this element is not mutable.
ProtectedrestartHelper function for return value, which signals "restart from".
node to restart from
StaticproxyWraps the given node into a NodeProxy. If the node is falsy, null
will be returned.
node to wrap
signals, if this representation is mutable or not
NodeProxy for given node; null for falsy values
Proxy to manipulate text nodes. General contract is, that all modifications are temporary, until you decide to persist the changes. Note, that a persisted proxy should not be re-used as it may cause unexpected results or may even fail.