selected_element
$oid = selected_element([doc[, flags]])
This function returns the oid for the containing element if the current selection is limited to an entire element. An entire element includes the start and end tags and any content that they encompass. By definition, the
oid_select function selects entire elements.
This function returns the value of the oid_null function if there is no selection, or if the selection doesn't encompass an entire element (for example, start tag and content, but not the end tag).
The optional
doc parameter specifies the identifier for the document containing the selection. If omitted or
0, the value for the
current_doc function is used.
The flags parameter is an optional bitmask specifying various options, and is constructed by ORing the flags from the following list:
• 0x1 — Ignore an optional leading and/or trailing blank before considering the selection.
Related Topics