Skip to content

MultipleEmailComponent

A component that displays and edits multiple email addresses.

You can add this component using SettingEx.addMultipleEmail.

In order to add the styles for the component, use initPluginContext in your plugin’s onload() function.

Alternatively, you can copy styles from https://github.com/mnaoumov/obsidian-dev-utils/releases/latest/download/styles.css.

Import:

import { MultipleEmailComponent } from 'obsidian-dev-utils/obsidian/setting-components/multiple-email-component';

Signature:

export class MultipleEmailComponent extends TypedTextComponent<readonly string[]>

Extends: TypedTextComponent<readonly string[]>

Constructor

new MultipleEmailComponent(containerEl: HTMLElement)

Creates a new multiple emails component.

Properties

PropertyTypeDescription
inputElHTMLInputElementAn input element of the component.
(Inherited from TypedTextComponent)
textComponentTextComponentThe inner text component.
(Inherited from TypedTextComponent)

Methods

MethodReturnsDescription
getValue()readonly string[]Gets the value of the component.
(Inherited from TypedTextComponent)
onChange(callback)thisSets the callback function to be called when the component is changed.
(Inherited from TypedTextComponent)
onChanged()voidCalled when the component is changed.
(Inherited from TypedTextComponent)
setDisabled(disabled)thisSets the disabled state of the component.
(Inherited from TypedTextComponent)
setValue(value)thisSets the value of the component.
(Inherited from TypedTextComponent)
valueFromString(str)readonly string[]Converts a string to an email address.
valueToString(value)stringConverts an email address to a string.
valueToString(value)stringConverts a value to a string.
(Inherited from TypedTextComponent)

Links to this page: