ui/labeledview/utils
@ckeditor/ckeditor5-ui/src/labeledview/utils
Filtering
Functions
-
createLabeledDropdown( labeledView, viewUid, statusUid ) → DropdownViewstatic
A helper for creating labeled dropdowns.
It creates an instance of a dropdown that is logically related to a labeled view.
The helper does the following:
- It sets dropdown's
idandariaDescribedByIdattributes. - It binds input's
isEnabledto the labeled view.
Usage:
const labeledInputView = new LabeledView( locale, createLabeledDropdown ); console.log( labeledInputView.view ); // A dropdown instance.Parameters
labeledView : LabeledViewThe instance of the labeled view.
viewUid : StringAn UID string that allows DOM logical connection between the labeled view label and the dropdown.
statusUid : StringAn UID string that allows DOM logical connection between the labeled view status and the dropdown.
Returns
DropdownViewThe dropdown view instance.
- It sets dropdown's
-
createLabeledInputText( labeledView, viewUid, statusUid ) → InputTextViewstatic
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
idandariaDescribedByIdattributes. - It binds input's
isReadOnlyto the labeled view. - It binds input's
hasErrorto the labeled view. - It enables a logic that cleans up the error when user starts typing in the input..
Usage:
const labeledInputView = new LabeledView( locale, createLabeledDropdown ); console.log( labeledInputView.view ); // An input instance.Parameters
labeledView : LabeledViewThe instance of the labeled view.
viewUid : StringAn UID string that allows DOM logical connection between the labeled view's label and the input.
statusUid : StringAn UID string that allows DOM logical connection between the labeled view's status and the input.
Returns
InputTextViewThe input text view instance.
- It sets input's