Skip to content

871738: UG documentation changed moved to hotfix for TextArea component #2795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/blur/blur.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public ActionResult Blur()
{
return View();
}
11 changes: 11 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/blur/razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using Syncfusion.EJ2.Inputs

@Html.EJS().TextArea("default").Blur("BlurHandler").Render()

<script>

function BlurHandler(args) {
// Here, you can customize your code.
}

</script>
11 changes: 11 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/blur/tagHelper
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using Syncfusion.EJ2.Inputs

<ejs-textarea id="default" blur="blurHandler"></ejs-textarea>

<script>

function blurHandler(args) {
// Here, you can customize your code.
}

</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public ActionResult Change()
{
return View();
}
11 changes: 11 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/change/razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using Syncfusion.EJ2.Inputs

@Html.EJS().TextArea("default").Change("ChangeHandler").Render()

<script>

function ChangeHandler(args) {
// Here, you can customize your code.
}

</script>
11 changes: 11 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/change/tagHelper
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using Syncfusion.EJ2.Inputs

<ejs-textarea id="default" change="changeHandler"></ejs-textarea>

<script>

function changeHandler() {
// Here, you can customize your code.
}

</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public ActionResult Created()
{
return View();
}
11 changes: 11 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/created/razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using Syncfusion.EJ2.Inputs

@Html.EJS().TextArea("default").Created("Created").Render()

<script>

function Created() {
// Here, you can customize your code.
}

</script>
11 changes: 11 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/created/tagHelper
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using Syncfusion.EJ2.Inputs

<ejs-textarea id="default" created="created"></ejs-textarea>

<script>

function created() {
// Here, you can customize your code.
}

</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public ActionResult Destroyed()
{
return View();
}
11 changes: 11 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/destroyed/razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using Syncfusion.EJ2.Inputs

@Html.EJS().TextArea("default").Destroyed("Destroyed").Render()

<script>

function Destroyed() {
// Here, you can customize your code.
}

</script>
11 changes: 11 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/destroyed/tagHelper
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using Syncfusion.EJ2.Inputs

<ejs-textarea id="default" destroyed="destroyed"></ejs-textarea>

<script>

function destroyed() {
// Here, you can customize your code.
}

</script>
4 changes: 4 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/focus/focus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public ActionResult Focus()
{
return View();
}
11 changes: 11 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/focus/razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using Syncfusion.EJ2.Inputs

@Html.EJS().TextArea("default").Focus("FocusHandler").Render()

<script>

function FocusHandler(args) {
// Here, you can customize your code.
}

</script>
11 changes: 11 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/focus/tagHelper
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using Syncfusion.EJ2.Inputs

<ejs-textarea id="default" focus="focusHandler"></ejs-textarea>

<script>

function focusHandler() {
// Here, you can customize your code.
}

</script>
4 changes: 4 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/input/input.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public ActionResult Input()
{
return View();
}
11 changes: 11 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/input/razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using Syncfusion.EJ2.Inputs

@Html.EJS().TextArea("default").Input("InputHandler").Render()

<script>

function InputHandler(args) {
// Here, you can customize your code.
}

</script>
11 changes: 11 additions & 0 deletions ej2-asp-core-mvc/code-snippet/textarea/events/input/tagHelper
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@using Syncfusion.EJ2.Inputs

<ejs-textarea id="default" input="inputHandler"></ejs-textarea>

<script>

function inputHandler() {
// Here, you can customize your code.
}

</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public ActionResult Label()
{
return View();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="control-section">
<div class="control_wrapper textarea-control-section">
@Html.EJS().TextArea("default").Placeholder("Enter your comments").FloatLabelType(FloatLabelType.Auto).Render()
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="control-section">
<div class="control_wrapper TextArea-control-section">
<ejs-textarea id="default" placeholder="Enter your comments" floatLabelType="Auto"></ejs-textarea>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public ActionResult Localization1()
{
return View();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="control-section">
<div class="control_wrapper textarea-control-section">
@Html.EJS().TextArea("default").Placeholder("veuillez inscrire vos commentaires").Locale("fr-BE").FloatLabelType(FloatLabelType.Auto).Render()
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="control-section">
<div class="control_wrapper TextArea-control-section">
<ejs-textarea id="default" placeholder="veuillez inscrire vos commentaires" locale="fr-BE" floatLabelType="Auto"></ejs-textarea>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public ActionResult Localization2()
{
return View();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

<div class="control-section">
<div class="control_wrapper textarea-control-section">
@Html.EJS().TextArea("default").Locale("de-DE").FloatLabelType(FloatLabelType.Auto).Render()
</div>
</div>

<script>
var L10n = ej.base.L10n;
L10n.load({
'de-DE': {
'textarea': {
placeholder: 'Geben Sie Ihre Kommentare ein'
}
}
});
loadCultureFiles('de-DE');
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div class="control-section">
<div class="control_wrapper TextArea-control-section">
<ejs-textarea id="default" locale="de-DE" floatLabelType="Auto"></ejs-textarea>
</div>
</div>

<script>
var L10n = ej.base.L10n;
L10n.load({
'de-DE': {
'textarea': {
placeholder: 'Geben Sie Ihre Kommentare ein'
}
}
});
loadCultureFiles('de-DE');
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public ActionResult FormValidator()
{
return View();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<div class="control-section">
<div class="control_wrapper" id="control_wrapper">
<h3 class="form-title">Feedback</h3>
<div class="control_wrapper textarea-form">
<form id="form1" method="post">
<div class="form-group">
<div class="e-float-input">
<label>Email</label>
<input type="email" id="email" name="email" data-email-message="Please enter valid email address."
data-required-message="Required field" required data-msg-containerid="emailError"/>
<span class="e-float-line"></span>
</div>
<div id="emailError"></div>
</div>
<div class="form-group">
<div>
<label>Comments</label>
<br/>
<div class="control_wrapper textarea-control-section">
@Html.EJS().TextArea("default").Placeholder("Enter your comments").FloatLabelType(FloatLabelType.Auto).HtmlAttributes(new { @name = "comments", @required = "", @data-msg-containerid="commentError" }).Render()
</div>
</div>
<div id="commentError"></div>
</div>
<div class="row">
<div style="float: left">
<button class="btn" type="submit">Submit</button>
</div>
<div style="float: left;">
<button class="btn" type="reset">Reset</button>
</div>
</div>
</form>
</div>
<br />
<br />
</div>
</div>

<script>
// sets required property in the FormValidator rules collection
var options = {
rules: {
'email': { required: [true, '* Please enter valid email'] },
comments: { required: [true, '* Please enter your comments'] }
},
};
// defines FormValidator to validate the TextArea
var formObject = new ej.inputs.FormValidator('#form1', options);

// places error label outside the TextArea using the customPlacement event of FormValidator

formObject.customPlacement = function (element, errorElement) {
document.querySelector("#default").parentNode.appendChild(errorElement);
};
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<div class="control-section">
<div class="control_wrapper" id="control_wrapper">
<h3 class="form-title">Feedback</h3>
<div class="control_wrapper textarea-form">
<form id="form1" method="post">
<div class="form-group">
<div class="e-float-input">
<label>Email</label>
<input type="email" id="email" name="email" data-email-message="Please enter valid email address."
data-required-message="Required field" required data-msg-containerid="emailError"/>
<span class="e-float-line"></span>
</div>
<div id="emailError"></div>
</div>
<div class="form-group">
<div>
<label>Comments</label>
<br/>
<div class="control_wrapper TextArea-control-section">
<ejs-textarea id="default" name="comments" data-msg-containerid="commentError" placeholder='Enter your comments' floatLabelType='Auto' required=""></ejs-textarea>
</div>
</div>
<div id="commentError"></div>
</div>
<div class="row">
<div style="float: left">
<button class="btn" type="submit">Submit</button>
</div>
<div style="float: left;">
<button class="btn" type="reset">Reset</button>
</div>
</div>
</form>
</div>
<br />
<br />
</div>
</div>

<script>
// sets required property in the FormValidator rules collection
var options = {
rules: {
'email': { required: [true, '* Please enter valid email'] },
comments: { required: [true, '* Please enter your comments'] }
},
};
// defines FormValidator to validate the TextArea
var formObject = new ej.inputs.FormValidator('#form1', options);

// places error label outside the TextArea using the customPlacement event of FormValidator

formObject.customPlacement = function (element, errorElement) {
document.querySelector("#default").parentNode.appendChild(errorElement);
};
</script>
Loading