overrides.js is part of Aloha Editor project http://www.alohaeditor.org
Aloha Editor ● JavaScript Content Editing Library
Copyright (c) 2010-2015 Gentics Software GmbH, Vienna, Austria.
Contributors http://www.alohaeditor.org/docs/contributing.html
Refernces:
http://www.w3.org/TR/CSS2/propidx.html
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#value
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#state
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#value-override
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#state-override
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#specified-command-value
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#inline-command-activated-values
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#equivalent-values
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#effective-command-value
http://www.w3.org/TR/CSS2/propidx.html
Aloha Editor ● JavaScript Content Editing Library
Copyright (c) 2010-2015 Gentics Software GmbH, Vienna, Austria.
Contributors http://www.alohaeditor.org/docs/contributing.html
Refernces:
http://www.w3.org/TR/CSS2/propidx.html
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#value
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#state
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#value-override
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#state-override
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#specified-command-value
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#inline-command-activated-values
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#equivalent-values
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#effective-command-value
http://www.w3.org/TR/CSS2/propidx.html
Members
-
nodeToStateObject.<string, string>
-
A table of node names that correlate to override commands.
- See:
-
- stateToNode
-
stateToNodeObject.<string, string>
-
A table of overrides an node names that correlate to them.
- See:
-
- nodeToState
Methods
-
consume(boundary, overrides){Boundary}
-
Inserts a DOM nodes at the given boundary to reflect the list of
overrides.Name Type Description boundary
Boundary overrides
Array.<Override> -
harvest(node, until){Array.<Override>}
-
Creates a list of overrides from the given node and all ancestors until
the given predicate or the editing host.Name Type Description node
Node until
function -
indexOf(overrides, name){number}
-
Returns the index of an override with the given command or state name in
the given list of overrides.
Returns -1 if override is not found.Name Type Description overrides
Array.<Override> name
string -
joinToSet(){Array.<Override>}
-
Joins a variable list of overrides-lists into a single unique set.
Type Description Array.<Override> repeatable -
toggle(overrides, name, value){Array.<Override>}
-
Toggles the value of the override matching the given name from among the
list of overrides.
Returns a copy of overrides that represents the new toggle state/value.Name Type Description overrides
Array.<Override> name
string value
string | boolean -
unique(overrides){Array.<Override>}
-
Returns a unique set from the given list of overrides.
The last override of any given key (first element of tuple) in the list
will be the value that is included in the resultant set.Name Type Description overrides
Array.<Override>