PromptBoxTagHelper
Kendo UI PromptBox TagHelper
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-promptbox")]
[RestrictChildren("action-button", new string[] { "end-affix-template", "file-select-button", "messages", "speech-to-text-button", "start-affix-template", "top-affix-template" })]
public class PromptBoxTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, ITemplateComponent
Inheritance: objectTagHelperTagHelperBasePromptBoxTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-promptbox name="promptBox">
<action-button enable="true" />
</kendo-promptbox>
Child Tags
Constructors
Initializes a new instance of the PromptBoxTagHelper class.
Properties
If set to false, the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.
public bool? Enable { get; set; }
Defines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons.When the built-in PromptBox buttons are enabled, the authored end-affix content stays in place and the framework backfills any missing built-in controls after it inside the same end-affix container. To adopt a custom element instead of the default control, include ref-promptbox-send-button, ref-promptbox-file-select-button, or ref-promptbox-speech-to-text-button on the authored element. This option expects the name of a JavaScript function that will be called to return the template.
public string EndAffixTemplateHandler { get; set; }
Defines the fill mode for the PromptBox container.
public FillMode? FillMode { get; set; }
Sets the loading state of the Action button. When true, the button displays a stop icon and allows users to cancel ongoing generation.
public bool? Loading { get; set; }
Sets the maximum height of the textarea in pixels. The textarea resizes automatically until it reaches this height. When the content exceeds this height, a scrollbar appears.
public double? MaxTextAreaHeight { get; set; }
Sets the mode of the PromptBox. Available options are "single", "multi", and "auto". single - Displays a single-line input field; multi - Displays a multi-line textarea with configurable rows or auto - Starts as a single line and expands automatically as the user types.
public PromptBoxMode? Mode { get; set; }
The name of the JavaScript function that will handle the blur event. Fires each time the PromptBox loses focus.
public string OnBlur { get; set; }
The name of the JavaScript function that will handle the fileRemove event. Fires each time the user removes a file attachment.
public string OnFileRemove { get; set; }
The name of the JavaScript function that will handle the fileSelect event. Fires each time the user selects files using the File Select button.
public string OnFileSelect { get; set; }
The name of the JavaScript function that will handle the focus event. Fires each time the PromptBox receives focus.
public string OnFocus { get; set; }
The name of the JavaScript function that will handle the input event. Fires each time the user types in the input field.
public string OnInput { get; set; }
The name of the JavaScript function that will handle the inputBlur event. Fires each time the internal input element loses focus.
public string OnInputBlur { get; set; }
The name of the JavaScript function that will handle the inputFocus event. Fires each time the internal input element receives focus.
public string OnInputFocus { get; set; }
The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the PromptBox is focused.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnKendoKeydown { get; set; }
The name of the JavaScript function that will handle the multilineStateChange event. Fires when the PromptBox transitions between single-line and multi-line states in auto mode.
public string OnMultilineStateChange { get; set; }
The name of the JavaScript function that will handle the promptAction event. Fires when the action button is clicked (send or stop). Check e.actionType to determine the action.
public string OnPromptAction { get; set; }
The name of the JavaScript function that will handle the speechToTextClick event. Fires each time the user clicks the Speech to Text button.
public string OnSpeechToTextClick { get; set; }
The name of the JavaScript function that will handle the speechToTextEnd event. Fires when the speech recognition service disconnects.
public string OnSpeechToTextEnd { get; set; }
The name of the JavaScript function that will handle the speechToTextError event. Fires when a speech recognition error occurs.
public string OnSpeechToTextError { get; set; }
The name of the JavaScript function that will handle the speechToTextResult event. Fires when the speech recognition service returns a result.
public string OnSpeechToTextResult { get; set; }
The name of the JavaScript function that will handle the speechToTextStart event. Fires when the speech recognition service begins listening.
public string OnSpeechToTextStart { get; set; }
The name of the JavaScript function that will handle the valueChange event. Fires when the value changes through user input (not programmatic changes).
public string OnValueChange { get; set; }
Sets the placeholder text displayed in the PromptBox when it is empty.
public string Placeholder { get; set; }
Sets the read-only state of the PromptBox. When set to true, the PromptBox content cannot be modified but remains accessible.
public bool? Readonly { get; set; }
Sets the number of visible text lines in the textarea. Applies only when the mode is set to "multi".
public double? Rows { get; set; }
Defines a custom template for the start affix area. The start affix is positioned before the input field. This option expects the name of a JavaScript function that will be called to return the template.
public string StartAffixTemplateHandler { get; set; }
Configures the templates for the PromptBox.
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }
Implements:
Sets the title attribute of the input or textarea element.
public string Title { get; set; }
Defines a custom template for the top affix area. The top affix is positioned at the top of the content area in multi-line mode only. This option expects the name of a JavaScript function that will be called to return the template.
public string TopAffixTemplateHandler { get; set; }
Methods
Gets the generated initialization script.
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Serializes the defined templates.
protected override Dictionary<string, object> SerializeTemplates()
Overrides:
Writes content to the output.
protected override void WriteHtml(TagHelperOutput output)
Overrides: