Skip to content

UrlValue

Official

Value wrapping an external link.

Import:

import { UrlValue } from 'obsidian';

Signature:

export class UrlValue extends StringValue

Extends: StringValue

Constructor

new UrlValue(value: string, display?: string | null | undefined)

Constructor.

To get the constructor instance, use getUrlValueConstructor from obsidian-typings/implementations.

Properties

PropertyTypeDescription
datastringThe wrapped primitive value.
(Inherited from StringValue)
displaynull | StringValueThe display text of the link, or null if none.
iconstringThe lucide icon name representing this value's type.
(Inherited from StringValue)
typestring
(Inherited from StringValue)

Methods

MethodReturnsDescription
equals(a, b)boolean
(Inherited from StringValue)
equals(other)booleanReturns a boolean indicating whether this Value is equal to the provided Value.
(Inherited from StringValue)
isTruthy()booleanReturns a boolean indicating whether this obsidian#PrimitiveValue is truthy.
(Inherited from StringValue)
keys()string[]Returns the property keys accessible on this value via Value.objectAccess.
(Inherited from StringValue)
looseEquals(a, b)boolean
(Inherited from StringValue)
looseEquals(other)booleanReturns a boolean indicating whether this Value is loosely equal to the provided Value.
(Inherited from StringValue)
objectAccess(key)null | ValueAccesses a named sub-property of this value.
(Inherited from StringValue)
renderTo(el, ctx)voidRender this value into the provided HTMLElement.
(Inherited from StringValue)
toString()stringGet the string representation of this obsidian#PrimitiveValue.
(Inherited from StringValue)

Links to this page: