Angular UI Components Documentation
The Angular Editor represents a ready-for-use HTML text editor which can simplify web content creation or be a replacement of your HTML Text Areas. This guide adds the Angular Editor (jqxEditor) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-ngjqwidgets-ng/jqxeditor 
In an Angular project (to start one, see Getting started with Angular), add the package with the Angular CLI. It asks for a theme and adds the styles to angular.json:
ng add jqwidgets-ng
Components are standalone: add jqxEditorModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxEditorModule } from 'jqwidgets-ng/jqxeditor';
@Component({
selector: 'app-root',
imports: [jqxEditorModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Default Functionality demo.
<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';
import { CommonModule } from '@angular/common';
import { jqxEditorModule } from 'jqwidgets-ng/jqxeditor';
@Component({
imports: [CommonModule, jqxEditorModule],
selector: 'app-root',
templateUrl: './app.html'
})
export class App {
getWidth(): any {
if (document.body.offsetWidth < 850) {
return '90%';
}
return 850;
}
}
Options are inputs, bound with [name]="value".
Events are outputs named on plus the event name with a capital first letter. For example, change: This is triggered when the jqxEditor's value is changed.
<jqxEditor (onChange)="onChange($event)"></jqxEditor>
onChange(event: any): void {
console.log(event.args);
}
Get the component with a signal query and call its methods. For example, val: Sets or gets the value.
<jqxEditor #myEditor></jqxEditor>
import { Component, viewChild } from '@angular/core';
import { jqxEditorModule, jqxEditorComponent } from 'jqwidgets-ng/jqxeditor';
@Component({
selector: 'app-root',
imports: [jqxEditorModule],
templateUrl: './app.html'
})
export class App {
readonly myEditor = viewChild.required<jqxEditorComponent>('myEditor');
run(): void {
const value = this.myEditor().val('New Editor Value!');
console.log(value);
}
}