You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
react-codemirror2 will prevent rendering in absence of `navigator` that is typical of a server environment. In case of any issue, you can force the component to not render via a `PREVENT_CODEMIRROR_RENDER` global variable that this wrapper respond to.
156
+
Yes. react-codemirror2 will prevent rendering in absence of `navigator`. You can also force the component to not render via a `PREVENT_CODEMIRROR_RENDER` global.
157
157
158
-
-getting the instance
158
+
-How can I get the instance?
159
159
160
-
getting the instance of the underlying editor can be done via the event callbacks where `editor`is returned. There is no static method to get it on demand, e.g. `CodeMirror.getInstance()`. The recommended approach can be observed as follows...
160
+
The recommended technique to get the instance is to persist the `editor` returned via event callbacks. There is no static method to get it on demand, e.g. `CodeMirror.getInstance()`. Example...
161
161
162
162
```jsx
163
163
constructor() {
@@ -169,5 +169,9 @@ render() {
169
169
}
170
170
```
171
171
172
+
- How can I make a resizable editor?
173
+
174
+
Check out [bokuweb/re-resizable](https://github.com/bokuweb/re-resizable) to wrap the editor in `<Resizable/>` components
0 commit comments