A lightweight text editor component for Angular applications.
- Basic text formatting (bold, italic, underline, strikethrough, superscript, subscript)
- Ordered and unordered lists
- Undo/redo functionality
- Link creation and removal
- Text alignment (left, center, right, justify)
- Indentation
- Color selection
- Style selection (headings, paragraph)
- Lightweight and easy to integrate
npm install mini-editor
For local development and testing, follow the steps:
- Build the library, This will create a
dist/mini-editor
folder.ng build mini-editor
- Navigate to the dist folder
cd dist/mini-editor
- Package the library
npm pack
- In your test application's project
npm install ../path/to/mini-editor-x.x.x.tgz
app.component.ts
import { Component } from '@angular/core';
import { MiniEditorComponent } from 'mini-editor'
@Component({
selector: 'app-root',
imports: [MiniEditorComponent],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
@ViewChild(MiniEditorComponent) miniEditor!: MiniEditorComponent;
getContent() {
const content = this.miniEditor.content;
console.log(content);
}
}
app.component.html
<mini-editor #miniEditor></mini-editor>