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

Hierarchy

Implements

Properties

OPTIONS: IViewOptions = View.defaultOptions
STATUSES: {
    beforeDestruct: "beforeDestruct";
    beforeInit: "beforeInit";
    destructed: "destructed";
    ready: "ready";
} = STATUSES

Type declaration

  • beforeDestruct: "beforeDestruct"
  • beforeInit: "beforeInit"
  • destructed: "destructed"
  • ready: "ready"
async: IAsync = ...
buffer: IStorage<StorageValueType> = ...

Some extra data inside editor

See

copyformat plugin

components: Set<IComponent<IViewBased<IViewOptions>>> = ...

All created ViewComponent inside this view

create: ICreate
defaultOptions: IViewOptions
esNext: boolean = isESNext
id: string

ID attribute for source element, id add {id}_editor it's editor's id

isJodit: boolean = false
isView: true = ...
message: IMessages
mods: IDictionary<null | string | boolean, string> = {}
ownerWindow: Window = window

The window in which jodit was created

progressbar: IProgressBar

progress_bar Progress bar

registeredButtons: Set<IPluginButton> = ...
storage: IStorage<StorageValueType> = ...

Container for persistent set/get value

toolbar: IToolbarCollection = ...
uid: string
version: string = appVersion

Methods

  • Parameters

    Returns void

  • Returns string

  • Returns void

  • Safe get any field

    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

    Type Parameters

    • T

    Parameters

    • chain: string

      the path to be traversed in the obj object

    • Optional obj: IDictionary<any, string>

      the object in which the value is searched

    Returns Nullable<T>

  • 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

  • Make one instance of one module

    Type Parameters

    Parameters

    • moduleName: string
    • Optional options: object

    Returns T

  • Get BEM class modification value

    Parameters

    • this: IMods
    • name: string

    Returns ModType

  • Returns string

  • Return current version

    Returns string

  • Internationalization method. Uses Jodit.lang object

    Parameters

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

    Returns string

  • Parameters

    • name: string

    Returns boolean

  • Disable selecting

    Parameters

    • name: string = 'any'

    Returns boolean

  • Change panel container

    Parameters

    Returns void

  • Set component status

    See

    ComponentStatus

    Parameters

    Returns void

  • Parameters

    • Optional isFullSize: boolean

    Returns void

  • Enable selecting

    Returns boolean

Accessors

  • get basePath(): string
  • Get path for loading extra staff

    Returns string

  • get c(): this["create"]
  • Returns this["create"]

  • get componentName(): string
  • Returns string

  • get defaultTimeout(): number
  • Return default timeout period in milliseconds for some debounce or throttle functions. By default, {history.timeout} options

    Returns number

  • get e(): this["events"]
  • Returns this["events"]

  • get isDestructed(): boolean
  • Component was destructed

    Returns boolean

  • get isFullSize(): boolean
  • View is in fullSize

    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 isLocked(): boolean
  • View is locked

    Returns boolean

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

    Returns boolean

  • get o(): this["options"]
  • Short alias for options

    Returns this["options"]

  • get options(): this["OPTIONS"]
  • Returns this["OPTIONS"]

  • set options(options: this["OPTIONS"]): void
  • Parameters

    • options: this["OPTIONS"]

    Returns void

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

    Returns Document

Jodit PRO

If you like Jodit - try Jodit PRO