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

OnChange event #17

Closed
svenboulanger opened this issue Oct 30, 2020 · 4 comments
Closed

OnChange event #17

svenboulanger opened this issue Oct 30, 2020 · 4 comments

Comments

@svenboulanger
Copy link

I believe the Monaco editor has an event for detecting a text change (onDidChangeContent on the model), but this hasn't been ported to BlazorMonaco (yet).

Is this going to be implemented (and if yes, when)?

@serdarciplak
Copy link
Owner

I've just added that event (and its siblings) and updated BlazorMonaco to v1.5.0. Just update it :)

@svenboulanger
Copy link
Author

Thanks for the swift response.

I'm not sure if I'm doing something wrong, but the OnDidChangeModelContent does not fire (I'm simply trying to show a message in the console).

Is there something else that I should be doing to get this to work?

<MonacoEditor @ref="_scriptEditor" Id="script-editor" CssClass="full-height border" OnDidChangeModelContent="Update" ConstructionOptions="GetStyleOptions" />

@serdarciplak
Copy link
Owner

Actually, I've tested it and saw that working. As there are changes in js files (and browsers use caches) can you try reloading all resource files in the browser?

@svenboulanger
Copy link
Author

Hi, thanks. I believe it must have been some kind of caching problem. I managed to get it working. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants