1
0
Fork 0

Force ltr on code inputs

This commit is contained in:
Chocobozzz 2023-07-19 11:03:40 +02:00
parent 15c2303489
commit d430862f00
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 6 additions and 3 deletions

View file

@ -94,7 +94,7 @@
</my-help>
<textarea
id="customizationJavascript" formControlName="javascript" class="form-control"
id="customizationJavascript" formControlName="javascript" class="form-control" dir="ltr"
[ngClass]="{ 'input-error': formErrors['instance.customizations.javascript'] }"
></textarea>
@ -124,7 +124,7 @@ color: red;
</my-help>
<textarea
id="customizationCSS" formControlName="css" class="form-control"
id="customizationCSS" formControlName="css" class="form-control" dir="ltr"
[ngClass]="{ 'input-error': formErrors['instance.customizations.css'] }"
></textarea>
<div *ngIf="formErrors.instance.customizations.css" class="form-error">{{ formErrors.instance.customizations.css }}</div>

View file

@ -19,6 +19,7 @@
name="instanceCustomHomepageContent" formControlName="content"
[customMarkdownRenderer]="getCustomMarkdownRenderer()" [debounceTime]="500"
[formError]="formErrors['instanceCustomHomepage.content']"
dir="ltr"
></my-markdown-textarea>
<div *ngIf="formErrors.instanceCustomHomepage.content" class="form-error">{{ formErrors.instanceCustomHomepage.content }}</div>

View file

@ -4,7 +4,7 @@
[(ngModel)]="content" (ngModelChange)="onModelChange()"
class="form-control" [ngClass]="{ 'input-error': formError }"
[attr.disabled]="disabled || null"
[id]="name" [name]="name">
[id]="name" [name]="name" [dir]="dir">
</textarea>
<div ngbNav #nav="ngbNav" class="nav-pills nav-preview">

View file

@ -37,6 +37,8 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
@Input() name = 'description'
@Input() dir: string
@ViewChild('textarea') textareaElement: ElementRef
@ViewChild('previewElement') previewElement: ElementRef