conversion inputs to components
This commit is contained in:
@@ -3,21 +3,17 @@ import { Component, forwardRef } from '@angular/core';
|
||||
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
||||
import { QuillModule } from 'ngx-quill';
|
||||
import { BaseInputComponent } from '../base-input/base-input.component';
|
||||
import { TooltipComponent } from '../tooltip/tooltip.component';
|
||||
import { ValidationMessagesService } from '../validation-messages.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-validated-quill',
|
||||
template: `
|
||||
<div>
|
||||
<label [for]="name" class="block text-sm font-medium text-gray-700">
|
||||
{{ label }}
|
||||
<span class="text-red-500 ml-1">{{ validationMessage }}</span>
|
||||
</label>
|
||||
<quill-editor [(ngModel)]="value" (ngModelChange)="onInputChange($event)" (onBlur)="onTouched()" [id]="name" [attr.name]="name" [modules]="quillModules"></quill-editor>
|
||||
</div>
|
||||
`,
|
||||
templateUrl: './validated-quill.component.html',
|
||||
styles: `quill-editor {
|
||||
width: 100%;
|
||||
}`,
|
||||
standalone: true,
|
||||
imports: [CommonModule, FormsModule, QuillModule],
|
||||
imports: [CommonModule, FormsModule, QuillModule, TooltipComponent],
|
||||
providers: [
|
||||
{
|
||||
provide: NG_VALUE_ACCESSOR,
|
||||
|
||||
Reference in New Issue
Block a user