The base class of all Jodit UI components. Provides work with a life cycle.

Hierarchy

Implements

Constructors

    Parameters

    • jodit: IViewBased<IViewOptions>
    • options: Partial<{
          autocomplete: boolean;
          className: string;
          clearButton?: boolean;
          icon: string;
          label: string;
          name: string;
          onChange?: ((value) => void);
          placeholder: string;
          ref: string;
          required: boolean;
          type: "number" | "text" | "checkbox" | "url" | "file" | "hidden";
          validators: string[];
          value: string | number;
      } & {
          checked: boolean;
          switch: boolean;
      }>

    Returns UICheckbox

Properties

STATUSES: {
    beforeDestruct: "beforeDestruct";
    beforeInit: "beforeInit";
    destructed: "destructed";
    ready: "ready";
} = STATUSES

Type declaration

  • Readonly beforeDestruct: "beforeDestruct"
  • Readonly beforeInit: "beforeInit"
  • Readonly destructed: "destructed"
  • Readonly ready: "ready"
async: IAsync = ...
container: HTMLElement
defaultState: {
    autocomplete: boolean;
    className: string;
    clearButton?: boolean;
    icon: string;
    label: string;
    name: string;
    onChange?: ((value) => void);
    placeholder: string;
    ref: string;
    required: boolean;
    type: "number" | "text" | "checkbox" | "url" | "file" | "hidden";
    validators: string[];
    value: string | number;
} & {
    checked: boolean;
    switch: boolean;
} = ...

Type declaration

  • autocomplete: boolean
  • className: string
  • Optional clearButton?: boolean
  • icon: string
  • label: string
  • name: string
  • Optional onChange?: ((value) => void)
      • (value): void
      • Parameters

        • value: string

        Returns void

  • placeholder: string
  • ref: string
  • required: boolean
  • type: "number" | "text" | "checkbox" | "url" | "file" | "hidden"
  • validators: string[]
  • value: string | number

Type declaration

  • checked: boolean
  • switch: boolean

Parent View element

mods: IDictionary<null | string | boolean> = {}
name: string = ''
ownerWindow: Window = window

The window in which jodit was created

state: {
    autocomplete: boolean;
    className: string;
    clearButton?: boolean;
    icon: string;
    label: string;
    name: string;
    onChange?: ((value) => void);
    placeholder: string;
    ref: string;
    required: boolean;
    type: "number" | "text" | "checkbox" | "url" | "file" | "hidden";
    validators: string[];
    value: string | number;
} & {
    checked: boolean;
    switch: boolean;
} = ...

Type declaration

  • autocomplete: boolean
  • className: string
  • Optional clearButton?: boolean
  • icon: string
  • label: string
  • name: string
  • Optional onChange?: ((value) => void)
      • (value): void
      • Parameters

        • value: string

        Returns void

  • placeholder: string
  • ref: string
  • required: boolean
  • type: "number" | "text" | "checkbox" | "url" | "file" | "hidden"
  • validators: string[]
  • value: string | number

Type declaration

  • checked: boolean
  • switch: boolean
uid: string

Accessors

  • get componentName(): string
  • Returns string

  • get componentStatus(): ComponentStatus
  • Current component status

    Returns ComponentStatus

  • set componentStatus(componentStatus): void
  • Setter for current component status

    Parameters

    Returns void

  • get defaultTimeout(): number
  • Returns number

  • set error(value): void
  • Parameters

    • value: string

    Returns void

  • get isDestructed(): boolean
  • Component was destructed

    Returns boolean

  • get isFocused(): boolean
  • Returns boolean

  • get isInDestruct(): boolean
  • The component is currently undergoing destructuring or has already been destroyed. Those. you should not hang new events on him now or do anything else with him.

    Returns boolean

  • get isReady(): boolean
  • Component is ready for work

    Returns boolean

  • get j(): T
  • Shortcut for this.jodit

    Returns T

  • get ownerDocument(): Document
  • The document in which jodit was created

    Returns Document

  • get value(): string
  • Returns string

  • set value(value): void
  • Parameters

    • value: string

    Returns void

Methods

  • Parameters

    Returns void

  • Apply callback for all parents

    Parameters

    • callback: ((parent) => void)
        • (parent): void
        • Parameters

          Returns void

    Returns UICheckbox

  • Returns string

  • Returns any

  • Returns void

  • Calc BEM element class name

    Parameters

    • elementName: string

      element name in the bem classification

    Returns string

  • Parameters

    • elementName: string
    • mod: string

    Returns string

  • Parameters

    • elementName: string
    • mod: string
    • modValue: string | boolean

    Returns string

  • Get BEM class modification value

    Parameters

    • this: IMods
    • name: string

    Returns ModType

  • Adds a handler for changing the component's status

    Parameters

    • status: ComponentStatus

      the status at which the callback is triggered

    • callback: ((component) => void)

      a function that will be called when the status is status

        • (component): void
        • Parameters

          Returns void

    Returns void

  • Parameters

    • text: string
    • Rest ...params: (string | number)[]

    Returns string

  • Set component status

    Parameters

    Returns void

    See

    ComponentStatus

  • Update UI from state

    Returns void

  • Returns boolean

Jodit PRO

If you like Jodit - try Jodit PRO