AnchorsHtml

Utilities for handling HTML Anchors.

Properties

Link copied to clipboard

The attribute used to store the anchor inside ANCHOR_TAG elements.

Link copied to clipboard
const val ANCHOR_TAG: String

The HTML tag used for anchors.

Functions

Link copied to clipboard
fun getAnchorElement(anchor: String, element: Element): Element?

Gets the element of the anchor with the specified anchor name within the given element, if the anchor exists.

Link copied to clipboard
fun stripAnchors(element: Element): Element

Removes all anchors from the given element.

Link copied to clipboard

Converts an anchor name to the HTML attribute value for ANCHOR_TAG.