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

Hierarchy

Constructors

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 = ...
jodit: IJodit

Parent View element

ownerWindow: Window = window

The window in which jodit was created

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

  • get isDestructed(): boolean
  • Component was destructed

    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

Methods

  • Insert column before / after all the columns containing the selected cells

    Parameters

    Returns void

  • Inserts a new line after row what contains the selected cell

    Parameters

    • table: HTMLTableElement
    • line: false | HTMLTableRowElement

      Insert a new line after/before this line contains the selected cell

    • after: boolean

      Insert a new line after line contains the selected cell

    • create: ICreate

    Returns void

  • Returns string

    Returns any

  • Get cell coordinate in formal table (without colspan and rowspan)

    Parameters

    Returns number[]

  • Generate formal table martix columns*rows

    Parameters

    • table: HTMLTableElement
    • Optional callback: ((cell, row, col, colSpan, rowSpan) => false | void)

      if return false cycle break

        • (cell, row, col, colSpan, rowSpan): false | void
        • Parameters

          Returns false | void

    Returns HTMLTableCellElement[][]

  • Safe get any field

    Type Parameters

    • T

    Parameters

    • chain: string

      the path to be traversed in the obj object

    • Optional obj: IDictionary

      the object in which the value is searched

    Returns Nullable<T>

    Example

    private a = {
    b: {
    c: {
    e: {
    g: {
    color: 'red'
    }
    }
    }
    }
    }

    this.get('a.b.c.e.g.color'); // Safe access to color
    // instead using optionsl chaining
    this?.a?.b?.c?.e?.g?.color
  • Returns columns count in the table

    Parameters

    Returns number

  • 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

  • Returns rows count in the table

    Parameters

    Returns number

  • 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

  • It combines all of the selected cells into one. The contents of the cells will also be combined

    Parameters

    Returns void

  • Try recalculate all coluns and rows after change

    Parameters

    Returns void

  • Remove column by index

    Parameters

    Returns void

  • Remove row

    Parameters

    Returns void

  • Set column width used delta value

    Parameters

    Returns void

  • Attach component to View

    Parameters

    Returns Table

  • Set component status

    Parameters

    Returns void

    See

    ComponentStatus

  • Divides all selected by jodit_focused_cell class table cell in 2 parts vertical. Those division into 2 columns

    Parameters

    Returns void

  • It splits all the selected cells into 2 parts horizontally. Those. are added new row

    Parameters

    Returns void

Jodit PRO

If you like Jodit - try Jodit PRO