ui/labeledfield/utils
@ckeditor/ckeditor5-ui/src/labeledfield/utils
Filtering
Functions
-
createLabeledDropdown( labeledFieldView, viewUid, statusUid ) → default
module:ui/labeledfield/utils~createLabeledDropdown
A helper for creating labeled dropdowns.
It creates an instance of a dropdown that is logically related to a labeled field view.
The helper does the following:
- It sets dropdown's
id
andariaDescribedById
attributes. - It binds input's
isEnabled
to the labeled view.
Usage:
const labeledInputView = new LabeledFieldView( locale, createLabeledDropdown ); console.log( labeledInputView.fieldView ); // A dropdown instance.
Parameters
labeledFieldView : LabeledFieldView<FocusableView>
The instance of the labeled field view.
viewUid : string
A UID string that allows DOM logical connection between the labeled view label and the dropdown.
statusUid : string
A UID string that allows DOM logical connection between the labeled view status and the dropdown.
Returns
default
The dropdown view instance.
- It sets dropdown's
-
createLabeledInputNumber( labeledFieldView, viewUid, statusUid ) → InputNumberView
module:ui/labeledfield/utils~createLabeledInputNumber
A helper for creating labeled number inputs.
It creates an instance of a input number that is logically related to a labeled view in DOM.
The helper does the following:
- It sets input's
id
andariaDescribedById
attributes. - It binds input's
isReadOnly
to the labeled view. - It binds input's
hasError
to the labeled view. - It enables a logic that cleans up the error when user starts typing in the input.
Usage:
const labeledInputView = new LabeledFieldView( locale, createLabeledInputNumber ); console.log( labeledInputView.fieldView ); // A number input instance.
Parameters
labeledFieldView : LabeledFieldView<FocusableView>
The instance of the labeled field view.
viewUid : string
A UID string that allows DOM logical connection between the labeled view's label and the input.
statusUid : string
A UID string that allows DOM logical connection between the labeled view's status and the input.
Returns
InputNumberView
The input number view instance.
- It sets input's
-
createLabeledInputText( labeledFieldView, viewUid, statusUid ) → InputTextView
module:ui/labeledfield/utils~createLabeledInputText
A helper for creating labeled inputs.
It creates an instance of a input text that is logically related to a labeled view in DOM.
The helper does the following:
- It sets input's
id
andariaDescribedById
attributes. - It binds input's
isReadOnly
to the labeled view. - It binds input's
hasError
to the labeled view. - It enables a logic that cleans up the error when user starts typing in the input.
Usage:
const labeledInputView = new LabeledFieldView( locale, createLabeledInputText ); console.log( labeledInputView.fieldView ); // A text input instance.
Parameters
labeledFieldView : LabeledFieldView<FocusableView>
The instance of the labeled field view.
viewUid : string
A UID string that allows DOM logical connection between the labeled view's label and the input.
statusUid : string
A UID string that allows DOM logical connection between the labeled view's status and the input.
Returns
InputTextView
The input text view instance.
- It sets input's
-
createLabeledTextarea( labeledFieldView, viewUid, statusUid ) → TextareaView
module:ui/labeledfield/utils~createLabeledTextarea
A helper for creating labeled textarea.
It creates an instance of a textarea that is logically related to a labeled view in DOM.
The helper does the following:
- It sets textarea's
id
andariaDescribedById
attributes. - It binds textarea's
isReadOnly
to the labeled view. - It binds textarea's
hasError
to the labeled view. - It enables a logic that cleans up the error when user starts typing in the textarea.
Usage:
const labeledTextarea = new LabeledFieldView( locale, createLabeledTextarea ); console.log( labeledTextarea.fieldView ); // A textarea instance.
Parameters
labeledFieldView : LabeledFieldView<FocusableView>
The instance of the labeled field view.
viewUid : string
A UID string that allows DOM logical connection between the labeled view's label and the textarea.
statusUid : string
A UID string that allows DOM logical connection between the labeled view's status and the textarea.
Returns
TextareaView
The textarea view instance.
- It sets textarea's
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.