0
export class EditBlogComponent implements OnInit {
   ...
   blog: Blog;
   ...


 editorStyle = {
    height: '400px;'
  };

  editorConfig = {
    toolbar: [
      ['bold', 'italic', 'underline', 'strike'],        // toggled buttons
      ['blockquote', 'code-block'],

      ['link', 'image', 'video']                         // link and image, video
    ]
  };


  ngOnInit(): void {
      ...
      //I got the blog with HttpClient from API and I synchronized it with my blog variable.
      this.blog = data;
      ...
  }
}

This code is from my edit-blog.component.html. I would like to set the blog description to quill editor when the Angular page is OnInit()

 <quill-editor [content]="blog.description" [style]="editorStyle" [modules]="editorConfig" (onEditorChanged)="changedEditor($event)"></quill-editor>

But when I add [content]="blog.description" to HTML, I get error. The error is;

  1. If 'quill-editor' is an Angular component and it has 'content' input, then verify that it is part of this module.
  2. If 'quill-editor' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
ofcskn
  • 55
  • 1
  • 8

0 Answers0