@kolkov/angular-editor 2.0.0 → 3.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,12 +9,10 @@
9
9
  [![npm](https://img.shields.io/npm/dm/@kolkov/angular-editor.svg)](https://www.npmjs.com/package/@kolkov/angular-editor)
10
10
  [![](https://data.jsdelivr.com/v1/package/npm/@kolkov/angular-editor/badge?style=rounded)](https://www.jsdelivr.com/package/npm/@kolkov/angular-editor)
11
11
  [![Coverage Status](https://coveralls.io/repos/github/kolkov/angular-editor/badge.svg?branch=master)](https://coveralls.io/github/kolkov/angular-editor?branch=master)
12
- [![dependencies Status](https://david-dm.org/kolkov/angular-editor/status.svg)](https://david-dm.org/kolkov/angular-editor)
13
- [![devDependencies Status](https://david-dm.org/kolkov/angular-editor/dev-status.svg)](https://david-dm.org/kolkov/angular-editor?type=dev)
14
12
  [![codecov](https://codecov.io/gh/kolkov/angular-editor/branch/master/graph/badge.svg)](https://codecov.io/gh/kolkov/angular-editor)
15
13
  [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/AndreyKolkov)
16
14
 
17
- A simple native WYSIWYG/Rich Text editor for Angular 6-13+
15
+ A simple native WYSIWYG/Rich Text editor for Angular 6-14+
18
16
 
19
17
  ![Nov-27-2019 17-26-29](https://user-images.githubusercontent.com/216412/69763434-259cd800-113b-11ea-918f-0565ebce0e48.gif)
20
18
 
@@ -128,6 +126,32 @@ editorConfig: AngularEditorConfig = {
128
126
  ```
129
127
  For `ngModel` to work, you must import `FormsModule` from `@angular/forms`, or for `formControlName`, you must import `ReactiveFormsModule` from `@angular/forms`
130
128
 
129
+ To serve the fontawesome files, ensure that your angular.json contains the following asset configuration:
130
+
131
+ ```
132
+ {
133
+ "glob": "**/*",
134
+ "input": "./node_modules/@kolkov/angular-editor/assets/",
135
+ "output": "./assets/fonts/"
136
+ }
137
+ ```
138
+
139
+ ### Custom buttons
140
+
141
+ You can define your custom buttons with custom actions using executeCommandFn. It accepts commands from [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand).
142
+ The first argument of this method is aCommandName and the second argument is aValueArgument. Example shows a button that adds Angular editor logo into the editor.
143
+ ```html
144
+ <angular-editor id="editor1" formControlName="htmlContent1" [config]="editorConfig">
145
+ <ng-template #customButtons let-executeCommandFn="executeCommandFn">
146
+ <ae-toolbar-set>
147
+ <ae-button iconClass="fa fa-html5" title="Angular editor logo"
148
+ (buttonClick)="executeCommandFn('insertHtml', angularEditorLogo)">
149
+ </ae-button>
150
+ </ae-toolbar-set>
151
+ </ng-template>
152
+ </angular-editor>
153
+ ```
154
+
131
155
  ## API
132
156
  ### Inputs
133
157
  | Input | Type | Default | Required | Description |
Binary file
Binary file