The Rich Text Editor for Angular, Built on ProseMirror
npm install ngx-editorThe Rich Text Editor for Angular, Built on ProseMirror
> A simple rich text editor for angular applications built with ProseMirror. It is a drop in and easy-to-use editor
> and can be easily extended using prosemirror plugins to build any additional or missing features
[demo] | [edit on stackblitz][stackblitz] | [documentation] | [migrating from other editors][migration]
Install via Package managers such as [npm] or [pnpm] or [yarn]
``bash`
npm install ngx-editoror
pnpm install ngx-editoror
yarn add ngx-editor
Note: By default the editor comes with minimal features. Refer the [demo] and [documentation] for more details and examples.
Component
`ts
import { NgxEditorComponent, NgxEditorMenuComponent, Editor } from 'ngx-editor';
import { FormsModule } from '@angular/forms';
@Component({
selector: 'editor-component',
templateUrl: 'editor.component.html',
styleUrls: ['editor.component.scss'],
standalone: true,
imports: [NgxEditorComponent, NgxEditorMenuComponent, FormsModule],
})
export class NgxEditorComponent implements OnInit, OnDestroy {
html = '';
editor: Editor;
ngOnInit(): void {
this.editor = new Editor();
}
ngOnDestroy(): void {
this.editor.destroy();
}
}
`
Then in HTML
`html``
[ngModel]="html"
[disabled]="false"
[placeholder]="'Type here...'"
>
Note: Input can be a HTML string or a jsonDoc
Mostly works on all Evergreen-Browsers like
- Google Chrome
- Microsoft Edge
- Mozilla Firefox
- Safari
- Opera
See https://sibiraj-s.github.io/ngx-editor/#/collab
Icons are from https://fonts.google.com/icons
All contributions are welcome. See CONTRIBUTING.md to get started.
[npm]: https://www.npmjs.com/
[pnpm]: https://pnpm.io/
[yarn]: https://yarnpkg.com/lang/en/
[documentation]: https://sibiraj-s.github.io/ngx-editor
[demo]: https://ngx-editor.stackblitz.io/
[stackblitz]: https://stackblitz.com/edit/ngx-editor
[migration]: https://sibiraj-s.github.io/ngx-editor/#/migration