mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
Document that plugins can require Electron
This commit is contained in:
parent
6e1f6f2b5e
commit
76eff24484
1 changed files with 11 additions and 0 deletions
11
PLUGINS.md
11
PLUGINS.md
|
|
@ -190,6 +190,17 @@ exports.decorateTerm = (Term, { React, notify }) => {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Require Electron
|
||||||
|
Hyper doesn't provide a reference to electron. However plugins can directly require electron.
|
||||||
|
|
||||||
|
```js
|
||||||
|
const electron = require('electron')
|
||||||
|
// or
|
||||||
|
const { dialog, Menu } = require('electron')
|
||||||
|
```
|
||||||
|
|
||||||
|
This is needed in order to allow show/hide to have proper return of focus.
|
||||||
|
|
||||||
## Hyper v2 breaking changes
|
## Hyper v2 breaking changes
|
||||||
Hyper v2 uses `xterm.js` instead of `hterm`. It means that PTY output renders now in a canvas element, not with a hackable DOM structure.
|
Hyper v2 uses `xterm.js` instead of `hterm`. It means that PTY output renders now in a canvas element, not with a hackable DOM structure.
|
||||||
For example, plugins can't use TermCSS in order to modify text or link styles anymore. It is now required to use available configuration params that are passed down to `xterm.js`.
|
For example, plugins can't use TermCSS in order to modify text or link styles anymore. It is now required to use available configuration params that are passed down to `xterm.js`.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue