Placeholder Binding Issue
See original GitHub issueI tried the method listed in the readme:
<angular-editor [placeholder]="'Enter text here...'" [(ngModel)]="htmlContent"></angular-editor>
both on my local install and on the stackblitz example . Both receive an error related to binding to placeholder
:
Stackblitz:
Error in /turbo_modules/@angular/compiler@7.0.4/bundles/compiler.umd.js (2617:21) Template parse errors: Can’t bind to ‘placeholder’ since it isn’t a known property of ‘angular-editor’.
- If ‘angular-editor’ is an Angular component and it has ‘placeholder’ input, then verify that it is part of this module.
- If ‘angular-editor’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.
- To allow any property add ‘NO_ERRORS_SCHEMA’ to the ‘@NgModule.schemas’ of this component. ("
Native WYSIWYG editor for Angular 6+
</header> <angular-editor [ERROR ->][placeholder]="'custom placeholder'" [(ngModel)]="htmlContent" [config]="config"></angular-editor> "): ng:///AppModule/AppComponent.html@5:20
Local:
Uncaught Error: Template parse errors: Can’t bind to ‘placeholder’ since it isn’t a known property of ‘angular-editor’.
<div class="container"> <form (ngSubmit)="onSubmit()" #memberForm="ngForm"> <angular-editor [ERROR ->][placeholder]="'Enter text here...'" [(ngModel)]="concert.notes"></angular-editor> ...
- If ‘angular-editor’ is an Angular component and it has ‘placeholder’ input, then verify that it is part of this module.
- If ‘angular-editor’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.
- To allow any property add ‘NO_ERRORS_SCHEMA’ to the ‘@NgModule.schemas’ of this component. ("
This occurs using angular 7.1.0 locally and 7.0.4 on stackblitz
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Property-Binding of placeholder in the input-tag with two ...
I am wondering how to bind two properties to ...
Read more >Binding to placeholder and a value with knockout
I would like to do something like this: binding to placeholder and a value at the same time · <input type="text" name="txtEmail" data-bind="attr: ......
Read more >Bind Function and Placeholders in C++ - GeeksforGeeks
What are placeholders? Placeholders are namespaces that direct the position of a value in a function.
Read more >std::placeholders::_1, std - cppreference.com
When used as an argument in a std::bind expression, the placeholder objects are stored in the generated function object, and when that ...
Read more >ASP.NET Core Blazor data binding - Microsoft Learn
Component parameters permit binding properties of a parent component with @bind-{PROPERTY} syntax, where the {PROPERTY} placeholder is the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue was fixed. Try new version please!
Hi, I experienced the same issue. I solved it by moving from this:
<angular-editor [placeholder]="'Enter text here...'" [(ngModel)]="htmlContent"></angular-editor>
to this:<angular-editor [config]="config" [(ngModel)]="htmlContent"></angular-editor>
and in the .ts file:
config: AngularEditorConfig = { editable: true, spellcheck: true, height: '15rem', minHeight: '5rem', placeholder: 'Enter text here...', translate: 'no' }
Hope it helps.