jQWidgets Forums

jQuery UI Widgets Forums Angular jqxEditor not a known element

This topic contains 3 replies, has 2 voices, and was last updated by  svetoslav_borislavov 1 year, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • jqxEditor not a known element #133819

    rmk3200
    Participant

    Module

    import { NgModule } from '@angular/core';
    import { CommonModule } from '@angular/common';
    import { FormsModule, ReactiveFormsModule } from '@angular/forms';
    import { PrintDesignerRoutingModule } from './print-designer-routing.module';
    import { jqxEditorModule } from 'jqwidgets-ng/jqxeditor';
    
    @NgModule({
      declarations: [],
      imports: [
        CommonModule, FormsModule, ReactiveFormsModule, jqxEditorModule,
        PrintDesignerRoutingModule]
    })
    export class PrintDesignerModule { }

    Html

    <jqxEditor [width]="getWidth()" [height]="400">
      <b>jqxEditor</b> is a HTML text editor designed to simplify web content creation. You can use it as a replacement of your Textarea.
      <br />
      <br />
      Features include:
      <br />
      <ul>
      <li>Text formatting</li>
      <li>Text alignment</li>
      <li>Hyperlink dialog</li>
      <li>Image dialog</li>
      <li>Bulleted list</li>
      <li>Numbered list</li>
      </ul>
    </jqxEditor>
    import { Component } from '@angular/core';
    
    @Component({
      selector: 'app-edit-print-designer',
      templateUrl: './edit-print-designer.component.html',
      styleUrls: ['./edit-print-designer.component.css']
    })
    export class EditPrintDesignerComponent {
      getWidth() : any {
    		if (document.body.offsetWidth < 850) {
    			return '90%';
    		}
    
    		return 850;
    	}
    }

    Issue:
    ‘jqxEditor’ is not a known element:
    1. If ‘jqxEditor’ is an Angular component, then verify that it is part of this module.
    2. To allow any element add ‘NO_ERRORS_SCHEMA’ to the ‘@NgModule.schemas’ of this component.ngtsc(-998001)
    edit-print-designer.component.ts(3, 85): Error occurs in the template of component EditPrintDesignerComponent.

    jqxEditor not a known element #133824

    Hi,

    You have to import the jqxEditorModule in the module of the component. It cannot be imported in a parent module

    Best regards,
    Svetoslav Borislavov

    jQWidgets Team
    https://www.jqwidgets.com/

    jqxEditor not a known element #133827

    rmk3200
    Participant

    How can we declare each component has each module?
    We have module and its components. 1 module and many components.

    jqxEditor not a known element #133830

    Hi,

    Which is the module in which the ‘EditPrintDesignerComponent’ component is declared?
    If it is ‘PrintDesignerRoutingModule’, the jqxEditorModule should be imported there.

    Best regards,
    Svetoslav Borislavov

    jQWidgets Team
    https://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.