Add optional onToggleFullScreen support from options #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have a project that wraps your editor in a React component, and I needed a way to append a class to a wrapper component. This change allowed me to set my component's state, thereby giving me the opportunity to conditionally style it.
Here is how I use your library, as well as the proposed change:
This change works with both the side-by-side mode, and the fullscreen mode, as well as any call to
EasyMDE.toggleFullScreen
orEasyMDE.prototype.toggleFullScreen
that other developers might use. I've thoroughly tested it with my project, and so far I've been unable to break it unless someone enters a non-function truthy value foronToggleFullScreen
.I'm not sure how to create a JSFiddle for this specific project, but since it's a small change I'm not sure if it's entirely warranted. Finally, I'd be happy to add the necessary documentation for this, but I'm not sure if I should add a section to the EasyMDE part of the README, or append it to the SimpleMDE part that has the rest of the props.