How to use the @ckeditor/ckeditor5-ui/src/labeledinput/labeledinputview function in @ckeditor/ckeditor5-ui

To help you get started, we’ve selected a few @ckeditor/ckeditor5-ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ckeditor / ckeditor5-media-embed / src / ui / mediaformview.js View on Github external
_createUrlInput() {
		const t = this.locale.t;

		const labeledInput = new LabeledInputView( this.locale, InputTextView );
		const inputView = labeledInput.inputView;

		this._urlInputViewInfoDefault = t( 'Paste the media URL in the input.' );
		this._urlInputViewInfoTip = t( 'Tip: Paste the URL into the content to embed faster.' );

		labeledInput.label = t( 'Media URL' );
		labeledInput.infoText = this._urlInputViewInfoDefault;
		inputView.placeholder = 'https://example.com';

		inputView.on( 'input', () => {
			// Display the tip text only when there's some value. Otherwise fall back to the default info text.
			labeledInput.infoText = inputView.element.value ? this._urlInputViewInfoTip : this._urlInputViewInfoDefault;
		} );

		return labeledInput;
	}
github Tangerine-Community / Tangerine / client / ckeditor / plugins / ckeditor5-acasi / src / formdialog / ui / formdialogformview.js View on Github external
_createOnchangeInputView() {
    const t = this.locale.t;
    // const onchangeInput = new LabeledInputView( this.locale, InputTextView );
    const onchangeInput = new LabeledInputView( this.locale, TextareaView );
    onchangeInput.label = t( 'Onchange javascript' );

    return onchangeInput;
  }
}
github ckeditor / ckeditor5-image / src / imagetextalternative / ui / textalternativeformview.js View on Github external
_createLabeledInputView() {
		const t = this.locale.t;
		const labeledInput = new LabeledInputView( this.locale, InputTextView );

		labeledInput.label = t( 'Text alternative' );
		labeledInput.inputView.placeholder = t( 'Text alternative' );

		return labeledInput;
	}
}
github Tangerine-Community / Tangerine / client / ckeditor / plugins / ckeditor5-acasi / src / formdialog / ui / formdialogformview.js View on Github external
_createFormIdInputView() {
    const t = this.locale.t;
    const formIdInput = new LabeledInputView( this.locale, InputTextView );
    formIdInput.label = t( 'Form id' );

    return formIdInput;
  }
github centaur54dev / ckeditor5-math-preview / src / ui / mathpreview_popupview.js View on Github external
_createModeInput() {
		const t = this.locale.t;
		const optionInline  = new LabeledInputView( this.locale, InputRadioView );
		const optionDisplay = new LabeledInputView( this.locale, InputRadioView );
		
		optionInline.labelView.text  = "Inline";
		optionInline.inputView.name  = "latexmode";
		optionInline.inputView.value = "inline";
		optionInline.inputView.checked = true;
		optionDisplay.labelView.text = "Display";
		optionDisplay.inputView.name = "latexmode";
		optionDisplay.inputView.value = "display";
		optionDisplay.inputView.checked = false;

		const radioGroup    = new RadioGroup(t, [optionInline,optionDisplay]  );
		radioGroup.name = "latexmode";
		return radioGroup;
	}
}
github Tangerine-Community / Tangerine / client / ckeditor / plugins / ckeditor5-acasi / src / introsrcdialog / ui / introsrcdialogformview.js View on Github external
_createNameInputView() {
    const t = this.locale.t;
    const nameInput = new LabeledInputView( this.locale, InputTextView );
    nameInput.label = t( 'Name' );

    return nameInput;
  }
}
github centaur54dev / ckeditor5-math-preview / src / ui / mathpreview_popupview.js View on Github external
_createModeInput() {
		const t = this.locale.t;
		const optionInline  = new LabeledInputView( this.locale, InputRadioView );
		const optionDisplay = new LabeledInputView( this.locale, InputRadioView );
		
		optionInline.labelView.text  = "Inline";
		optionInline.inputView.name  = "latexmode";
		optionInline.inputView.value = "inline";
		optionInline.inputView.checked = true;
		optionDisplay.labelView.text = "Display";
		optionDisplay.inputView.name = "latexmode";
		optionDisplay.inputView.value = "display";
		optionDisplay.inputView.checked = false;

		const radioGroup    = new RadioGroup(t, [optionInline,optionDisplay]  );
		radioGroup.name = "latexmode";
		return radioGroup;
	}
}