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

allowing CodeMirror to accept programmatic changes #3664

Merged
merged 1 commit into from May 17, 2020

Conversation

patchcr
Copy link

@patchcr patchcr commented Apr 9, 2020

What does this PR do?

  • uses Context.code with an overloaded CodeView.sync to send html as well as retrieve it from CodeView. In particular, this allows us to send external html to the CodeMirror editor when it is visible.

Where should the reviewer start?

  • Context.js

How should this be manually tested?

  • editor.summernote('code', '<div>new content</div>') to modify the contents of an editor which was initialized with CodeMirror and has CodeView currently activated.

Any background context you want to provide?

  • Currently the only way to get the CodeMirror editor to recognize that new content was added by the surrounding application is to toggle into wysiwyg mode, call 'code', and toggle back.

What are the relevant tickets?

None

Screenshot (if for frontend)

Checklist

  • added relevant tests (no automated tests cover CodeMirror currently)
  • didn't break anything (ran the tests and nothing else broke)

@patchcr patchcr marked this pull request as ready for review April 9, 2020 22:10
@lqez lqez self-assigned this Apr 15, 2020
@lqez lqez added this to the v0.8.17 milestone Apr 28, 2020
@lqez lqez merged commit fdc29ca into summernote:develop May 17, 2020
@lqez
Copy link
Member

lqez commented May 17, 2020

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

Successfully merging this pull request may close these issues.

None yet

3 participants