sibiraj-s / ngx-editor

🖋️ Rich Text Editor for angular using ProseMirror
https://sibiraj-s.github.io/ngx-editor/
MIT License
424 stars 183 forks source link

Added to Event Emitter to receive 'blur' and 'focus' events from parent component which holds the Editor. #35

Closed senthil090 closed 6 years ago

senthil090 commented 6 years ago

Some events have been handled internally, there were no public api to handle this event from parent component. i have just emit the blur and focus event which handled for disable the buttons on toolbar. now we can receive this from parent.

sibiraj-s commented 6 years ago

when will this come in handy. I thought that was unnecessary. can you provide an example?

senthil090 commented 6 years ago

Let us assume that we use this editor inside a form and we would like to have this editor as a form element. Form elements should have this options to make it more customizable. And also we have to make the validation for the editor that supports reactive form as well as template driven.

On Jan 4, 2018 12:16 PM, "Sibiraj" notifications@github.com wrote:

when will this come in handy. I thought that was unnecessary. can you provide an example?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Sibiraj-S/ngx-editor/pull/35#issuecomment-355210567, or mute the thread https://github.com/notifications/unsubscribe-auth/AL3dN_8LQp5H1VkyKDssl-5HD1Rp426Eks5tHHPagaJpZM4RSI4K .

sibiraj-s commented 6 years ago

Can we provide more unique name for the events. Those names are more universal.

sibiraj-s commented 6 years ago

onFocus and onBlur will be sufficient enough I guess.

senthil090 commented 6 years ago

Lint not allowed to create the class property name prefixed with 'On' and not allowed to use reference name in Output decorator. Also we already have onBlur and onFocus as methods.

sibiraj-s commented 6 years ago

oh. do we 😸

sibiraj-s commented 6 years ago

for now I will merge this. Will see the rest later. I didn't notice the methods. 😸

senthil090 commented 6 years ago

Thank you :+1:

github-actions[bot] commented 2 years ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.