Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service provider for default behaviour #79

Open
zaalbarxx opened this issue Oct 9, 2015 · 3 comments
Open

Service provider for default behaviour #79

zaalbarxx opened this issue Oct 9, 2015 · 3 comments

Comments

@zaalbarxx
Copy link

Hi!
I think it would be a good idea to create some provider for this module to allow for some default behaviour for all instances of Summernote. For now every time you want to put some config you have to copy-paste it to every instance, it would be much better to typically merge some settings from provider(mostly thinking about some global handlers for events like for example save or paste) with the ones passed to directive to allow for some global configuration. What do you think ?

@outsideris
Copy link
Owner

It looks good idea, but I'm considering what interfaces it should expose and how it should support.
Did you see such kind of directive you said in other project?

@outsideris outsideris self-assigned this Oct 12, 2015
@zaalbarxx
Copy link
Author

Most likely it should expose the way to create some global actions for certain events. In my case it would be just perfect if I would be able to make some action every time the text is pasted into the editor, no matter which one. For now I would have to find every single instance of Summernote in my project and manually add handlers for that. With providers I could just configure it via provider and forget about it.

@dhoko
Copy link

dhoko commented May 9, 2016

+1

And also we can register the configuration for each directive inside this service, better than using the scope for that.

@outsideris outsideris removed their assignment Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants