goog.editor.style
Namespace.getContainer(node)
Return the first ancestor of this node that is a container, inclusive.
node
{Node
}
Element
}
.isContainer(element)
Returns true if the element is a container of other non-inline HTML Note that span, strong and em tags, being inline can only contain other inline elements and are thus, not containers. Containers are elements that should not be broken up when wrapping selections with a node of an inline block styling.
element
{Node
}
boolean
}
.isDisplayBlock(node)
Checks whether the given element inherits display: block.
node
{Node
}
boolean
}
.makeSelectable(element)
Make the given element selectable. For IE this simply turns off the "unselectable" property. Under FF no descendent of an unselectable node can be selectable: https://bugzilla.mozilla.org/show_bug.cgi?id=203291 So we make each ancestor of node selectable, while trying to preserve the unselectability of other nodes along that path This may cause certain text nodes which should be unselectable, to become selectable. For example:
or , then this problem would
not arise. Text nodes do not have styles, so its style can't be set to
unselectable.
Makes the given element unselectable, as well as all of its children, except
for text areas, text, file and url inputs.
element
{Element
}
.makeUnselectable(element, eventHandler)
element
{Element
}
eventHandler
{goog.events.EventHandler
}