constructor(jodit:IJodit){ super(jodit); console.log(this.isReady);// true // Errors are possible here, since the status of the component is already 'ready' but you have not yet initialized its fields this.status=newStatusBar(jodit); } }
Therefore, it is better to use a decorator [[core/decorators/component]]
Jodit UI component system
Every Jodit element inherits from [[Component]], and implements the [[IComponent]] interface accordingly.
Such elements have a name
And also each component has its current [[STATUSES | status]]:
You can work on changes in the status of a component through the decorator [[decorators/hook]] either through the method [[Component.hookStatus]]
To set the status, it is enough to call the method [[Component.setStatus]]
The component itself can automatically set the ready status:
But it’s better not to do this, because with inheritance, such a component will be “ready” ahead of time:
Therefore, it is better to use a decorator [[core/decorators/component]]