Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* An instance of the {@link module:ui/componentfactory~ComponentFactory}, a registry used by plugins
* to register factories of specific UI components.
*
* @readonly
* @member {module:ui/componentfactory~ComponentFactory} #componentFactory
*/
this.componentFactory = new ComponentFactory( editor );
/**
* Stores the information about the editor UI focus and propagates it so various plugins and components
* are unified as a focus group.
*
* @readonly
* @member {module:utils/focustracker~FocusTracker} #focusTracker
*/
this.focusTracker = new FocusTracker();
/**
* Fires throttled {@link module:core/editor/editorui~EditorUI#event:update} event.
*
* @protected
* @type {Function}
*/
this._throttledUpdate = throttle( () => this.fire( 'update' ), 5 );
// Informs UI components that should be refreshed after layout change.
this.listenTo( editor.editing.view.document, 'layoutChanged', () => this.update() );
}
* An instance of the {@link module:ui/componentfactory~ComponentFactory}, a registry used by plugins
* to register factories of specific UI components.
*
* @readonly
* @member {module:ui/componentfactory~ComponentFactory} #componentFactory
*/
this.componentFactory = new ComponentFactory( editor );
/**
* Stores the information about the editor UI focus and propagates it so various plugins and components
* are unified as a focus group.
*
* @readonly
* @member {module:utils/focustracker~FocusTracker} #focusTracker
*/
this.focusTracker = new FocusTracker();
/**
* Stores all editable elements used by the editor instance.
*
* @private
* @member {Map.}
*/
this._editableElementsMap = new Map();
// Informs UI components that should be refreshed after layout change.
this.listenTo( editor.editing.view.document, 'layoutChanged', () => this.update() );
}
this.items = this.createCollection();
/**
* An array with objects representing colors to be displayed in the grid.
*
* @type {Arrray.}
*/
this.colorDefinitions = colors;
/**
* Tracks information about the DOM focus in the list.
*
* @readonly
* @member {module:utils/focustracker~FocusTracker}
*/
this.focusTracker = new FocusTracker();
/**
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
*
* @readonly
* @member {module:utils/keystrokehandler~KeystrokeHandler}
*/
this.keystrokes = new KeystrokeHandler();
/**
* Keeps the value of the command associated with the table for the current selection.
*
* @type {String}
*/
this.set( 'selectedColor' );
constructor( locale ) {
super( locale );
const t = this.locale.t;
/**
* Tracks information about DOM focus in the form.
*
* @readonly
* @member {module:utils/focustracker~FocusTracker}
*/
this.focusTracker = new FocusTracker();
/**
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
*
* @readonly
* @member {module:utils/keystrokehandler~KeystrokeHandler}
*/
this.keystrokes = new KeystrokeHandler();
/**
* A textarea with a label.
*
* @member {module:ui/labeledinput/labeledinputview~LabeledInputView} #labeledTextarea
*/
this.formIdInput = this._createFormIdInputView();
constructor( locale ) {
super( locale );
const t = this.locale.t;
/**
* Tracks information about the DOM focus in the form.
*
* @readonly
* @member {module:utils/focustracker~FocusTracker}
*/
this.focusTracker = new FocusTracker();
/**
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
*
* @readonly
* @member {module:utils/keystrokehandler~KeystrokeHandler}
*/
this.keystrokes = new KeystrokeHandler();
/**
* A textarea with a label.
*
* @member {module:ui/labeledinput/labeledinputview~LabeledInputView} #labeledTextarea
*/
this.labeledInput = this._createLabeledInputView();
constructor( validators, locale ) {
super( locale );
const t = locale.t;
/**
* Tracks information about DOM focus in the form.
*
* @readonly
* @member {module:utils/focustracker~FocusTracker}
*/
this.focusTracker = new FocusTracker();
/**
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
*
* @readonly
* @member {module:utils/keystrokehandler~KeystrokeHandler}
*/
this.keystrokes = new KeystrokeHandler();
/**
* The URL input view.
*
* @member {module:ui/labeledinput/labeledinputview~LabeledInputView}
*/
this.urlInputView = this._createUrlInput();
constructor( locale ) {
super( locale );
const t = this.locale.t;
/**
* Tracks information about DOM focus in the form.
*
* @readonly
* @member {module:utils/focustracker~FocusTracker}
*/
this.focusTracker = new FocusTracker();
/**
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
*
* @readonly
* @member {module:utils/keystrokehandler~KeystrokeHandler}
*/
this.keystrokes = new KeystrokeHandler();
/**
* A textarea with a label.
*
* @member {module:ui/labeledinput/labeledinputview~LabeledInputView} #labeledTextarea
*/
this.labeledInput = this._createLabeledInputView();
constructor( editor ) {
super( editor.locale );
/**
* Tracks information about DOM focus in the form.
*
* @readonly
* @member {module:utils/focustracker~FocusTracker}
*/
this.focusTracker = new FocusTracker();
/**
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
*
* @readonly
* @member {module:utils/keystrokehandler~KeystrokeHandler}
*/
this.keystrokes = new KeystrokeHandler();
this.emojiButtonViews = new ViewCollection( editor.locale );
/**
* The Smile button view.
*
* @member {module:ui/button/buttonview~ButtonView}
*/
editor.config.get( 'emoji' ).forEach( emoji => {
constructor( engine, locale ) {
super( locale );
const t = locale.t;
this.math = new Utils.MathObject();
this.focusTracker = new FocusTracker(); //Tracks information about DOM focus in the form.
this.keystrokes = new KeystrokeHandler();
//----ui elements
this.radioGroup_latexMode = this._createModeInput();
this.latexRender = new LatexRenderView(engine, this.locale);
this.bottomPanel = new HorizontalPanel(this.locale.t, [this.radioGroup_latexMode]);
//----A collection of views which can be focused in the form.
this._focusables = new ViewCollection();
//----Helps cycling over {@link #_focusables} in the form.
this._focusCycler = new FocusCycler( {
focusables: this._focusables,
focusTracker: this.focusTracker,
keystrokeHandler: this.keystrokes,
actions: {
/**
* Collection of the child tile views.
*
* @readonly
* @member {module:ui/viewcollection~ViewCollection}
*/
this.items = this.createCollection();
/**
* Tracks information about DOM focus in the grid.
*
* @readonly
* @member {module:utils/focustracker~FocusTracker}
*/
this.focusTracker = new FocusTracker();
/**
* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
*
* @readonly
* @member {module:utils/keystrokehandler~KeystrokeHandler}
*/
this.keystrokes = new KeystrokeHandler();
/**
* Helps cycling over focusable {@link #items} in the grid.
*
* @readonly
* @protected
* @member {module:ui/focuscycler~FocusCycler}
*/