A powerful, lightweight, and customizable rich text editor component for Angular. This editor provides advanced text formatting, image insertion, alignment options, and seamless integration with Angular forms.
- Customizable Toolbar: Supports dynamic formatting options.
- Text Formatting: Bold, italic, underline, lists, and alignment.
- Image Upload & Resize: Easily insert and resize images.
- Selection API: Apply styles to selected text.
- Reactive Forms Support: Implements
ControlValueAccessorfor seamless form integration. - Standalone Component: Can be used independently in Angular projects.
<app-advance-text-editor [(ngModel)]="editorContent"></app-advance-text-editor>export class MyComponent {
editorContent = "<p>Hello, World!</p>";
}<app-advance-text-editor [customMenu]="['bold', 'italic', 'underline']"></app-advance-text-editor>| Property | Type | Default | Description |
|---|---|---|---|
customMenu |
string[] |
[] |
List of formatting options to display. |
| Event | Description |
|---|---|
valueChange |
Emits updated content whenever the text is modified. |
Applies a specific formatting to the selected text.
Aligns selected text or images (left, center, right).
Handles image uploads and inserts them into the editor.
Inserts custom values into the editor.
Clears the editor content.
You can customize the editor styles via CSS:
.advance-text-editor {
border: 1px solid #ccc;
padding: 10px;
min-height: 200px;
}You can extend the component by modifying advance-text-editor.component.ts to add new features like font selection, background colors, etc.
Check out the live demo on StackBlitz: Angular Rich Text Editor
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature-branch) - Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature-branch) - Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project useful, please ⭐ the repository and share it!
For any issues or suggestions, open an issue on GitHub.
