Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
vue-monaco
Advanced tools
Monaco Editor is the code editor that powers VS Code.
yarn add vue-monaco
<script src="/path/to/monaco-editor/min/vs/loader.js"></script>
<script>
require.config({
paths: {
vs: '/path/to/monaco-editor/min/vs'
}
})
</script>
Then use the component:
<template>
<monaco-editor
class="editor"
v-model="code"
language="javascript">
</monaco-editor>
</template>
<script>
import MonacoEditor from 'vue-monaco'
export default {
components: {
MonacoEditor
},
data() {
return {
code: 'const noop = () => {}'
}
}
}
</script>
<style>
.editor {
width: 600px;
height: 800px;
}
</style>
code
language
theme
options
placeholder
: Display a placeholder until the monaco editor is loaded. Could a string or vNode.Event | IStandaloneCodeEditor Event | Parameters |
---|---|---|
editorMount | IStandaloneCodeEditor | |
contextMenu | onContextMenu | IEditorMouseEvent |
blur | onDidBlurEditor | |
blurText | onDidBlurEditorText | |
configuration | onDidBlurEditorText | IConfigurationChangedEvent |
position | onDidChangeCursorPosition | ICursorPositionChangedEvent |
selection | onDidChangeCursorSelection | ICursorSelectionChangedEvent |
model | onDidChangeModel | IModelChangedEvent |
change | onDidChangeModelContent | value: string, e: IModelContentChangedEvent |
modelDecorations | onDidChangeModelDecorations | IModelDecorationsChangedEvent |
modelLanguage | onDidChangeModelLanguage | IModelLanguageChangedEvent |
modelOptions | onDidChangeModelOptions | IModelOptionsChangedEvent |
afterDispose | onDidDispose | |
focus | onDidFocusEditor | |
focusText | onDidFocusEditorText | |
layout | onDidLayoutChange | EditorLayoutInfo |
scroll | onDidScrollChange | IScrollEvent |
keydown | onKeyDown | IKeyboardEvent |
keyup | onKeyUp | IKeyboardEvent |
mouseDown | onMouseDown | IEditorMouseEvent |
mouseLeave | onMouseLeave | IEditorMouseEvent |
mouseMove | onMouseMove | IEditorMouseEvent |
mouseUp | onMouseUp | IEditorMouseEvent |
getMonaco(): IStandaloneCodeEditor
: Return the editor instance.Use ref
to interact with the MonacoEditor
component in order to access methods: <MonacoEditor ref="editor"></MonacoEditor>
, then this.$refs.editor.getMonaco()
will be available.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
vue-monaco © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).
egoist.moe · GitHub @egoist · Twitter @_egoistlily
FAQs
MonacoEditor component for Vue.js
We found that vue-monaco demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.