Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ngx-simple-text-editor

Raiper345.9kMIT5.0.3TypeScript support: included

Ngx Simple Text editor or ST editor is a simple native text editor component for Angular 9+.

angular, text, editor, text editor, angular text editor, wysiwyg, wysiwyg editor

readme

npm version docs npm bundle size NPM CircleCI Coverage Status npm npm npm GitHub Repo stars

ngc simple text editor logo

Ngx Simple Text editor

Ngx Simple Text editor or ST editor is a simple native text editor component for Angular 9+. The key features of this editor are simplicity, cross-browser compatibility, and extensibility.

demo

Content

🔗 Compatibility

Angular version Ngx simple text editor version Font awesome version
9 - 13 0.0.0 - 1.x.x 5.0.0-6.x.x
14 2.x.x 5.0.0-6.x.x
15 3.x.x 5.0.0-6.x.x
16 4.x.x 5.0.0-6.x.x
17 - 19 5.x.x 5.0.0-6.x.x

🚀 Instalation

npm install ngx-simple-text-editor --save

then add NgxSimpleTextEditorModule into module imports

import {NgxSimpleTextEditorModule} from 'ngx-simple-text-editor';

@NgModule({
// ...
  imports: [
    // ...
    NgxSimpleTextEditorModule,
    // ...
  ],
// ...
})

If you want to use default button icons, you must install Font awesome. npm install @fortawesome/fontawesome-free and declare in styles in angular.json

...
"styles": [
  "src/styles.scss",
  "node_modules/@fortawesome/fontawesome-free/css/all.css"
]
...

💻 Usage

You can use Ngx simple text editor as classic template-driven form input or as reactive form input.

<st-editor [(ngModel)]="content" [config]="config"></st-editor>

The editor has got only one @Input with config object, which is optional. The config object is defined by placeholder and buttons, both are optional and can be omitted.

import { Component } from '@angular/core';
import {EditorConfig, ST_BUTTONS} from 'ngx-simple-text-editor';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  content = '';
  config: EditorConfig = {
    placeholder: 'Type something...',
    buttons: ST_BUTTONS,
  };
}

📚 Documentation and demos

Online documentation and demos

📖 License

MIT

changelog

Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

5.0.3

  • fix(color-picker): attempt to fix nondeterministic color-picker bug logic rewriting 14ca5c3

5.0.2

9 January 2025

  • fix(editor): every click in the toolbar button has been performed form submission #24

5.0.1

29 December 2024

  • docs(website): new documentation website 7e21d15
  • docs(site): add localization page to document site ae388aa
  • docs(readme): improve readme.md and add custom buttons paragraph 22d232d
  • docs(site): add custom style page to documentation site 41ee3e5
  • chore: release v5.0.1 ddac62a
  • docs(website): added stackblitz playground 8c346a1
  • docs(readme): improve content menu in readme.md 7f7854f
  • docs(readme): update compatibility table and unify badges 083715e
  • fix(website): fix live demo iframe link 9bbc477
  • docs(website): added npm link to cover page bb9257d

5.0.0

1 April 2024

  • feature(upgrade): upgrade angular to v17 5b771dc
  • feature(upgrade): upgrade node v to v18.13.0, typescript to v5.2.2 and zone.js to 0.14.4 e8c356b

4.0.3

21 October 2023

  • fix(editor): editor initial value in reactive forms #18

4.0.2

9 October 2023

  • fix(editor): editor placeholder cursor and click bug fix #17

4.0.1

27 August 2023

  • fix(package): fix package json versions 7ca9481

4.0.0

27 August 2023

  • feature(upgrade): upgrade angular 15 to 16 864bdae

3.0.0

10 January 2023

  • chore(typescript): typescript 4.8 upgrade #16
  • docs(font-awesome): add font awesome compatibility into documentation a262411

2.0.0

6 November 2022

  • Feature/angular 14 upgrade #15
  • feature(upgrade): upgrade angular 11 -> 12 b6bfa80
  • feature(upgrade): upgrade angular 9 -> 10 f757fa0
  • feature(upgrade): upgrade angular 10 -> 11 90031a7
  • feature(upgrade): upgrade angular 12 -> 13 d237462
  • feature(upgrade): upgrade angular 10 -> 11 900ee2e
  • feature(upgrade): upgrade angular 13 -> 14 5744ea5

4.0.0

27 August 2023

  • feature(upgrade): upgrade angular 15 to 16 864bdae

3.0.0

10 January 2023

  • Feature/angular 15 upgrade #16
  • chore(typescript): typescript 4.8 upgrade #16
  • docs(font-awesome): add font awesome compatibility into documentation a262411

2.0.0

6 November 2022

  • Feature/angular 14 upgrade #15
  • feature(upgrade): upgrade angular 11 -> 12 b6bfa80
  • feature(upgrade): upgrade angular 9 -> 10 f757fa0
  • feature(upgrade): upgrade angular 10 -> 11 90031a7
  • feature(upgrade): upgrade angular 12 -> 13 d237462
  • feature(upgrade): upgrade angular 10 -> 11 900ee2e
  • feature(upgrade): upgrade angular 13 -> 14 5744ea5

1.1.0

20 August 2022

  • add add image button

1.0.1

07 August 2022

  • fix ivy building