The name of the element.
The URL. If the value returned is undefined
, then the URL is
not available. If the value returned is null
, the URL has not been
loaded yet.
This method returns a mappings of prefix to namespace URI that are set to resolve names outside the context of an XML tree. It is sometimes useful to use qualified names that do not depend on how a specific XML document is structured, this method provides for such functionality.
The mappings. This is a new copy which you can modify at will.
This method returns a name resolver that uses the map returned by getAbsoluteNamespaceMappings. The resolver is created once and for all. So code using the resolver should not modify it because it will modify the resolver for all clients. If you need a resolver you can modify, use getAbsoluteNamespaceMappings and initialize a resolver from it.
The resolver.
Provide the possible value completions for an attribute. This allows a mode to support dynamic computations for completions.
The attribute for which we want completions.
The possible completions.
Modes must implement this method to specify what transformations they allow
based on state. The implementation should rely on the container
and
offset
position rather than use the caret because the editor may be
seeking information about possible actions near to the caret.
The type or types of transformations to return.
The tag name we are interested in. This should be in a prefix:localName format where "prefix" is one of the prefixes defined in the absolute mappings known to the mode.
The position in the data tree.
The position in the data tree.
The actions.
Gets the mode options.
Get additional stylesheets to use to render the HTML.
An array of paths to the stylesheets to load for this mode. The paths must not require any additional interpretation from wed.
Get the toolbar actions that this mode wants the editor to present.
The toolbar actions for this mode.
Allows the mode to perform mode-specific checks on the document. This method will be called by wed to obtain a mode-specific validator to give to wed's own validator. Mode-specific validators are meant to provide checks that cannot be provided by a schema. It would be conceivable for instance to call a schematron processor.
The validator if this mode has one.
Gets the options that the mode wants wed to use with this mode.
The options. Callers are not allowed to modify the value returned.
This is called by the editor when a mode is ready to be initialized. The mode could use this to add a toolbar above the editor or add listeners to key events, etc.
A promise that resolves once the mode is done initializing.
Make a decorator that this mode will use.
This method can be overriden by modes to provide the editor with different placeholders for different elements. The default implementation returns a default placeholder for all elements.
This is the element for which to make a placeholder.
A placeholder for the element.
Find the nodes that are children of element
and that are just before
and just after the content of element that is editable.
This is the element to examine. MUST BE PART OF THE GUI TREE.
An array of two elements. The first is the node before editable contents, the second is the node after. Either node can be null if there is nothing before or after editable contents. Both are null if there is nothing around the editable content.
Returns a short description for an element. The element should be named according to the mappings reported by the resolve returned by getAbsoluteResolver.
The name of the element.
The description. If the value returned is undefined
, then
description is not available. If the value returned is null
, the
description has not been loaded yet.
Unresolve a name according to the absolute reverse mapping.
If the forward mappings define multiple prefixes pointing to the same URI, the unresolving algorithm will arbitrarily select one of the prefixes as the value corresponding to the URI. Modes may impose whatever rules they desire to select which prefix they should privilege.
The name to unresolve.
The unresolved name or undefined
if the name cannot be
unresolved.
Generated using TypeDoc
Returns a URL to the documentation for an element. The element should be named according to the mappings reported by the resolve returned by getAbsoluteResolver. The default implementation returns
undefined
for everything.