Skip to content

Commit 88e198e

Browse files
authored
Merge pull request #41 from JordanW9232/master
Added @output events
2 parents 0abafdd + 051047c commit 88e198e

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"style": "kebab-case"
3535
}
3636
],
37-
"@angular-eslint/no-output-on-prefix": 0
37+
"@angular-eslint/no-output-on-prefix": 0,
38+
"@angular-eslint/no-output-rename": 0
3839
}
3940
},
4041
{

src/lib/angular-markdown-editor/angular-markdown-editor.component.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AfterViewInit, Component, ElementRef, forwardRef, Inject, Input } from '@angular/core';
1+
import {AfterViewInit, Component, ElementRef, EventEmitter, forwardRef, Inject, Input, Output} from '@angular/core';
22
import { NG_VALUE_ACCESSOR } from '@angular/forms';
33
import { EditorLocale, EditorOption } from './models';
44
import { GlobalEditorOptions } from './global-editor-options';
@@ -33,6 +33,18 @@ export class AngularMarkdownEditorComponent implements AfterViewInit {
3333
/** Number of rows for the textarea */
3434
@Input() rows = 10;
3535

36+
/** These do not actually ever emit, since bootstrap-markdown already emits the event. This is simply just for typings **/
37+
@Output('onShow') private readonly _onShow: EventEmitter<any> = new EventEmitter<any>();
38+
@Output('onPreview') private readonly _onPreview: EventEmitter<any> = new EventEmitter<any>();
39+
@Output('onPreviewEnd') private readonly _onPreviewEnd: EventEmitter<any> = new EventEmitter<any>();
40+
@Output('onSave') private readonly _onSave: EventEmitter<any> = new EventEmitter<any>();
41+
@Output('onBlur') private readonly _onBlur: EventEmitter<any> = new EventEmitter<any>();
42+
@Output('onFocus') private readonly _onFocus: EventEmitter<any> = new EventEmitter<any>();
43+
@Output('onChange') private readonly _onChange: EventEmitter<any> = new EventEmitter<any>();
44+
@Output('onFullscreen') private readonly _onFullscreen: EventEmitter<any> = new EventEmitter<any>();
45+
@Output('onFullscreenExit') private readonly _onFullscreenExit: EventEmitter<any> = new EventEmitter<any>();
46+
@Output('onSelect') private readonly _onSelect: EventEmitter<any> = new EventEmitter<any>();
47+
3648
public value: any | any[];
3749
public onModelChange: Function = () => { };
3850
public onModelTouched: Function = () => { };

0 commit comments

Comments
 (0)