Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@tidbcloud/codemirror-extension-save-helper
Advanced tools
codemiror extension to help save editor content
A codemirror extension listens the editor doc changes, if changes, it will call the save handler in delay time, or, you can press the defined hotkey (default is Mod-s
) to call save handler immediately.
npm install @tidbcloud/codemirror-extension-save-helper
You need to install its peer dependencies as well:
npm install @codemirror/view @codemirror/state
import { EditorView } from '@codemirror/view'
import { EditorState } from '@codemirror/state'
import { saveHelper } from '@tidbcloud/codemirror-extension-save-helper'
const editorView = new EditorView({
state: EditorState.create({
doc,
extensions: [
saveHelper({
save: (view: EditorView) => {
// call save file api
saveFile(view.state.doc.toString())
}
})
]
})
})
type SaveHelperOptions = {
/* in milliseconds, default 5000 */
delay?: number
/* default is true */
auto?: boolean
/* default is Mod-s */
hotkey?: string
/* save handler */
save: (view: EditorView) => void
}
function saveHelper(options: SaveHelperOptions): Extension
FAQs
codemiror extension to help save editor content
We found that @tidbcloud/codemirror-extension-save-helper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.