1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PrimeNg Editor is not showing up - Angular

Discussion in 'Programming/Internet' started by Sem Ideia, Sep 12, 2018.

  1. Sem Ideia

    Sem Ideia Guest

    I have followed many tutorials, but as of yet, I did not manage to make PrimeNG's Editor module to show up!

    So here is what I did:

    Import module in app.module.ts

    import { EditorModule } from 'primeng/editor';


    Installed packages

    npm install quill --save

    npm install @types/quill --save


    Updated angular-cli.json

    "styles": [ "../node_modules/quill/dist/quill.core.css", "../node_modules/quill/dist/quill.snow.css", ]
    "scripts": [ "../node_modules/quill/dist/quill.js" ]


    Inserted in HTML in 2 different ways

    <p-editor [(ngModel)]="text" [style]="{'height':'320px'} ngDefaultControl"></p-editor>

    <form style="text-align: center; margin: 0 auto; width: auto" [formGroup]="avisoForm" (ngSubmit)="atualizarCargo()">
    ...
    <p-editor formControlName="msgAviso" [style]="{'height':'320px'}" ngDefaultControl></p-editor>

    </form>


    Reference them in TS file

    this.avisoForm = new FormGroup({
    msgAviso: new FormControl,
    titAviso: new FormControl
    })

    text: string;


    Yet it does not show anything to the end-user, even though the p-editor tag is shown there:

    End-User Screen

    I think it could be a CSS problem, but I have checked on the CSS files, but I could barely retrieve a tag because it does not show anything in the page. (I have searched the one from PrimeNG original website, it does a tag but it's not in the CSS either).

    I have searched on many sources, yet I haven't found any answer to solve that problem, can someone help me out? Thanks!

    Sources:


    Login To add answer/comment
     

Share This Page