Initial Commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
@using System.Web
|
||||
<div class="escapeCodeContainer">
|
||||
<textarea style="background-color: #2C2E33; width: 100%; border:3px solid #A8ADB9; border-radius:1px; padding: 8px;"
|
||||
rows="8"
|
||||
@onchange="OnChange"/>
|
||||
|
||||
<textarea style="background-color: #2C2E33; width: 100%; border:3px solid #A8ADB9; border-radius:1px; padding: 8px;"
|
||||
rows="8"
|
||||
@bind="Output"/>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.escapeCodeContainer {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@code {
|
||||
string Output = "";
|
||||
|
||||
public void OnChange(ChangeEventArgs changeEventArgs)
|
||||
{
|
||||
var encoded = HttpUtility.HtmlEncode(changeEventArgs.Value!.ToString());
|
||||
Output = encoded?.Replace("@", "@@")!;
|
||||
Output = Output.Replace("\n", "<br />");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user