@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 +27 -3
- package/assets/FontAwesome.otf +0 -0
- package/assets/fontawesome-webfont.eot +0 -0
- package/assets/fontawesome-webfont.svg +2671 -0
- package/assets/fontawesome-webfont.ttf +0 -0
- package/assets/fontawesome-webfont.woff +0 -0
- package/assets/fontawesome-webfont.woff2 +0 -0
- package/esm2020/lib/ae-button/ae-button.component.mjs +22 -0
- package/esm2020/lib/ae-select/ae-select.component.mjs +6 -6
- package/esm2020/lib/ae-toolbar-set/ae-toolbar-set.component.mjs +12 -0
- package/esm2020/lib/angular-editor-toolbar.component.mjs +5 -5
- package/esm2020/lib/angular-editor.component.mjs +16 -11
- package/esm2020/lib/angular-editor.module.mjs +9 -7
- package/esm2020/lib/angular-editor.service.mjs +7 -6
- package/esm2020/public-api.mjs +4 -1
- package/fesm2015/kolkov-angular-editor.mjs +65 -29
- package/fesm2015/kolkov-angular-editor.mjs.map +1 -1
- package/fesm2020/kolkov-angular-editor.mjs +65 -29
- package/fesm2020/kolkov-angular-editor.mjs.map +1 -1
- package/lib/ae-button/ae-button.component.d.ts +10 -0
- package/lib/ae-toolbar-set/ae-toolbar-set.component.d.ts +6 -0
- package/lib/angular-editor-toolbar.component.d.ts +1 -1
- package/lib/angular-editor.component.d.ts +8 -5
- package/lib/angular-editor.module.d.ts +5 -3
- package/lib/angular-editor.service.d.ts +2 -1
- package/package.json +3 -3
- package/public-api.d.ts +3 -0
package/README.md
CHANGED
|
@@ -9,12 +9,10 @@
|
|
|
9
9
|
[](https://www.npmjs.com/package/@kolkov/angular-editor)
|
|
10
10
|
[](https://www.jsdelivr.com/package/npm/@kolkov/angular-editor)
|
|
11
11
|
[](https://coveralls.io/github/kolkov/angular-editor?branch=master)
|
|
12
|
-
[](https://david-dm.org/kolkov/angular-editor)
|
|
13
|
-
[](https://david-dm.org/kolkov/angular-editor?type=dev)
|
|
14
12
|
[](https://codecov.io/gh/kolkov/angular-editor)
|
|
15
13
|
[](https://paypal.me/AndreyKolkov)
|
|
16
14
|
|
|
17
|
-
A simple native WYSIWYG/Rich Text editor for Angular 6-
|
|
15
|
+
A simple native WYSIWYG/Rich Text editor for Angular 6-14+
|
|
18
16
|
|
|
19
17
|

|
|
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
|