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

New callback for capturing changes on Codeview #3083

Merged
merged 2 commits into from Dec 12, 2018
Merged

Conversation

lqez
Copy link
Member

@lqez lqez commented Dec 10, 2018

What does this PR do?

  • This provides a new callback onChangeCodeview for capturing changes on Codeview. (also works with CodeMirror)

What are the relevant tickets?

Checklist

  • added relevant tests
  • didn't break anything

@DennisSuitters
Copy link
Member

@lqez WIll this allow us to dynamically update each of the views if visible? For e.g. If each view is visible side by side, and content in code view is edited and in real time make changes in normal view, like edit code and see a preview while editing.

@lqez
Copy link
Member Author

lqez commented Dec 11, 2018

@DiemenDesign Yes, I think so either. :)

@lqez lqez merged commit 2914322 into develop Dec 12, 2018
@lqez lqez deleted the add-onchange-codeview branch December 12, 2018 05:51
@yxl
Copy link

yxl commented Jan 28, 2019

Thanks for providing the fix.

Should we also fire onChange event when codeview changes? It is straightforward to let onchange callback capture codeview changes and less error prone for newcomers to properly set up onchange callback.

It is likely that people forget to add onChangeCodeview callback when watching the content changes.

@lqez
Copy link
Member Author

lqez commented Jan 29, 2019

We'd discussed this before, and chose to separate two dedicated events.
I worried about pre-created a lot of onChange callbacks what originally expected getting events only in WYSIWYG view. I also agree with you but explicit and consistency are more important than others.

Thank you for your kind feedback, @yxl.

@f1yn
Copy link

f1yn commented Apr 12, 2019

Please merge this upstream

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

Successfully merging this pull request may close these issues.

None yet

4 participants