I'm getting the following errors when trying to build my form using ngx-editorjs:
Can't bind to 'holder' since it isn't a known property of 'ngx-editorjs-mat-field'.
1. If 'ngx-editorjs-mat-field' is an Angular component and it has 'holder' input, then verify that it is part of this module.
2. If 'ngx-editorjs-mat-field' 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. ("
<mat-form-field>
<ngx-editorjs-mat-field [id]="holder"
[ERROR ->][holder]="holder"
formControlName="pageEditor"
[blocks]="blocks | async"
"): ng:///CoreModule/PagesComponent.html@3:2
This is the app.module.ts:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { NgxEditorJSModule } from '@tinynodes/ngx-editorjs';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MatGridListModule } from '@angular/material/grid-list';
import { MatCardModule } from '@angular/material/card';
import { MatMenuModule } from '@angular/material/menu';
import { MatIconModule } from '@angular/material/icon';
import { MatButtonModule } from '@angular/material/button';
import { LayoutModule } from '@angular/cdk/layout';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatListModule } from '@angular/material/list';
import { CoreModule } from './core/core.module';
import { CoreRoutingModule } from './core/core-routing.module';
import { NgxEditorjsPluginsModule } from '@tinynodes/ngx-editorjs-plugins';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
HttpClientModule,
AppRoutingModule,
BrowserAnimationsModule,
MatGridListModule,
MatCardModule,
MatMenuModule,
MatIconModule,
MatButtonModule,
LayoutModule,
MatToolbarModule,
MatSidenavModule,
MatListModule,
NgxEditorJSModule.forRoot({
// Optional Configuration, see all keys below
editorjs: {
autofocus: false,
holder: 'editor',
initialBlock: 'paragraph',
data: {
time: Date.now(),
blocks: []
}
}
}),
NgxEditorjsPluginsModule,
CoreModule,
CoreRoutingModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
The component class:
import { Component, OnInit } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
@Component({
selector: 'app-pages',
templateUrl: './pages.component.html',
styleUrls: ['./pages.component.scss']
})
export class PagesComponent implements OnInit {
editorForm: FormGroup;
constructor() { }
ngOnInit() {
this.editorForm = new FormGroup({
pageEditor: new FormControl('')
});
}
}
I'm getting the following errors when trying to build my form using ngx-editorjs:
This is the app.module.ts:
The component class:
And the component template:
I'm sure I'm being thick here, but could you point me to the solution?