yağmur doğan
yağmur doğan

Reputation: 67

primeng text editor icon and label is not displaying

I don't see the icons of the buttons within the primeng Text Editor that I use in the Angular project. enter image description here

I added to the module: import { EditorModule } from 'primeng/editor';

in HTML below:

<p-editor class="fa fa-xxx"  [(ngModel)]="text1" [style]="{'height':'320px'}"></p-editor>
                <p>Value: {{text1||'empty'}}</p>

                <button pButton type="button" label="Clear" icon="fa-close" (click)="text1=null"></button>

                <hr style="border-top:0px;border-color:#dde3e6">

Upvotes: 2

Views: 2378

Answers (1)

DirtyMind
DirtyMind

Reputation: 2563

Primeng has dependency on primeng icons. If you want to use icon you have to install it explicitly.

npm install primeicons --save 

Now in your styles.css you need to import the icons like below:

@import '../node_modules/primeicons/primeicons.css';

or you can add icons in your angular.json file like below:

"styles": [
  "node_modules/primeicons/primeicons.css",
  "node_modules/primeng/resources/themes/nova-light/theme.css",
  "node_modules/primeng/resources/primeng.min.css",
  //...
]

All the details given here PrimeNg get started

Upvotes: 1

Related Questions