
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Web editor based on CodeMirror. Fork of edward.

emmet (for html files)~/.dword.json)npm i dword -g

Usage: dword [filename]
| Parameter | Operation |
|---|---|
-h, --help | display help and exit |
-v, --version | output version information and exit |
| Key | Operation |
|---|---|
Ctrl + s | save |
Ctrl + f | find |
Ctrl + h | replace |
Ctrl + g | go to line |
Ctrl + e | evaluate (JavaScript only supported) |
dword could be used as middleware for express. For this purpuse API could be used.
Middleware of dword. Options could be omitted.
import {dword} from 'dword';
import express from 'express';
const app = express();
app.use(dword({
root: '/', // default
online: true, // default
diff: true, // default
zip: true, // default
dropbox: false, // optional
dropboxToken: 'token', // optional
}));
app.listen(31_337);
Could be used with socket.io to handle editor events with.
import {Server} from 'socket.io';
const socket = new Server(server);
dword.listen(socket, {
// optional
prefixSocket: '/dword',
// optional
auth: (accept, reject) => (username, password) => {
accept();
},
});
Dword uses codemirror on client side, so API is similar.
All you need is put minimal html, css, and js into your page.
Minimal html:
<div class="edit" data-name="js-edit"></div>
<script src="/dword/dword.js"></script>
Minimal css:
html, body, .edit {
height: 100%;
margin: 0;
}
Minimal js:
dword('[data-name="js-edit"]', (editor) => {
editor.setValue('hello dword');
console.log('dword is ready');
});
dword(selector, callback)selector: stringcallback: EditorCallbackInitialize new instance
editor.setValue(value)value: stringSet value to editor.
editor.getValue()returns: stringGet value from editor.
interface Editor {
setValue: (value: string) => void;
getValue: () => string;
}
type EditorCallback = (editor: Editor) => void;
type Dword = (selector: string, callback: EditorCallback) => void;
For more information you could always look around client/dword.js directory.
MIT
FAQs
Web editor based on CodeMirror
We found that dword demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.