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

Expose of UI #2

Open
gkopevski opened this issue Apr 9, 2017 · 4 comments
Open

Expose of UI #2

gkopevski opened this issue Apr 9, 2017 · 4 comments

Comments

@gkopevski
Copy link
Contributor

Hi,
I am new to summernote and both typescript. I am having a problem to get the ui object from summernote (http://summernote.org/deep-dive/#custom-button).

Can you please provide me help how to expose the ui to the the summernote types or give me guide/example how to achieve this.

Thanks

@wstaelens
Copy link
Owner

Hi,

I've only needed a basic summernote definition in TypeScript, because of code I was converting. so I only wrote this (I'm not sure how the modules would translate to TypeScript itself).

The UI and other modules are not yet defined, feel free to add it to the code or discuss further. I believe my TypeScript skills are the same as yours! :-)

@gkopevski
Copy link
Contributor Author

I managed to solve it by adding 1 more interface:
interface JQueryStatic { summernote:any; }
On this way I am able to get the ui instance:
Example:
let ui = $.summernote.ui;

If you tink that it is ok, I will make pull request.

@wstaelens
Copy link
Owner

well for sure it is ok as it makes the UI module available.
You or others can later on improve code if they want.

@gkopevski
Copy link
Contributor Author

Added pull request
#3

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

2 participants