UrlValue
Official
Value wrapping an external link.
Import:
import { UrlValue } from 'obsidian';Signature:
export class UrlValue extends StringValueExtends: StringValue
Constructor
new UrlValue(value: string, display?: string | null | undefined)Constructor.
To get the constructor instance, use getUrlValueConstructor from obsidian-typings/implementations.
Properties
| Property | Type | Description | |
|---|---|---|---|
| data | string | The wrapped primitive value. (Inherited from StringValue) | |
| display | null | StringValue | The display text of the link, or null if none. | |
| icon | string | The lucide icon name representing this value's type. (Inherited from StringValue) | |
| type | string | (Inherited from StringValue) |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| equals(a, b) | boolean | (Inherited from StringValue) | |
| equals(other) | boolean | Returns a boolean indicating whether this Value is equal to the provided Value. (Inherited from StringValue) | |
| isTruthy() | boolean | Returns 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) | boolean | Returns a boolean indicating whether this Value is loosely equal to the provided Value. (Inherited from StringValue) | |
| objectAccess(key) | null | Value | Accesses a named sub-property of this value. (Inherited from StringValue) | |
| renderTo(el, ctx) | void | Render this value into the provided HTMLElement. (Inherited from StringValue) | |
| toString() | string | Get the string representation of this obsidian#PrimitiveValue.(Inherited from StringValue) |
Links to this page: