Skip to content

This accessor allows you to use Angular forms with contenteditable elements with ease. It has zero dependencies, other than Angular itself as peer and works with Angular 4+ in all modern browsers, including Internet Explorer 11

License

Notifications You must be signed in to change notification settings

howdysuraj/angular-contenteditable-accessor

 
 

Repository files navigation

Tinkoff ControlValueAccessor for contenteditable elements

Build Coverage Status npm version

This accessor allows you to use Angular forms with contenteditable elements with ease. It has zero dependencies, other than Angular itself as peer and works with Angular 4+ in all modern browsers, including Internet Explorer 11.

Install

$ npm install @tinkoff/angular-contenteditable-accessor

Import

Simply import ContenteditableValueAccessorModule along with either Angular's form modules into your component's module

How to use

Use with template and reactive forms like that:

<div [(ngModel)]="model" contenteditable></div>

<div [formControl]="control" contenteditable></div>

<form [formGroup]="group">
  <div formControlName="control" contenteditable></div>
</form>

Demo

https://stackblitz.com/edit/angular2-contenteditable-value-accessor

Maintain

See MAINTAIN.md

About

This accessor allows you to use Angular forms with contenteditable elements with ease. It has zero dependencies, other than Angular itself as peer and works with Angular 4+ in all modern browsers, including Internet Explorer 11

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • TypeScript 77.9%
  • JavaScript 11.1%
  • HTML 10.0%
  • CSS 1.0%