I've created a form with field Rich Text Editor in angularJs using Quill-Editor.
I want to save form data along with Rich Text Editor using Laravel.
My view
<form>
<div class="form-group mb-4">
<label for="heading">Heading</label>
<input type="text" name="name" class="form-control">
</div>
<div class="form-group mb-4">
<label for="image">Image</label>
<input type="file" name="image" class="form-control">
</div>
<div class="form-group">
<label for="editor"><h3>Description</h3></label>
<quill-editor [styles]="{height: '400px'}" [modules]="editorModules" (onEditorChanged)="changedEditor($event)"></quill-editor>
</div>
</form>
Component.ts
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { EditorChangeContent, EditorChangeSelection } from 'ngx-quill';
@Component({
selector: 'app-posts',
templateUrl: './posts.component.html',
styleUrls: ['./posts.component.scss']
})
export class PostsComponent implements OnInit {
editorText = '';
constructor() { }
ngOnInit(): void {
}
changedEditor(event: EditorChangeContent | EditorChangeSelection){
this.editorText = event['editor']['root']['innerHTML'];
}
}
How Can I save the data in database.