![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
codemirror-editor-vue3
Advanced tools
The plug-in is based on Codemirror and only supports vue3. In addition to the modes supported by codemirror, this plugin also supports custom log modes.
For complete documentation and more cases, please check codemirror-editor-vue3-docs.(Currently only Chinese version, English version is under planning)
npm install codemirror-editor-vue3 -S
yarn add codemirror-editor-vue3
main.js:
import { createApp } from "vue";
import App from "./App.vue";
import Codemirror from "codemirror-editor-vue3";
const app = createApp(App);
app.use(Codemirror);
app.mount("#app");
<template>
<Codemirror
v-model:value="code"
:options="cmOptions"
border
placeholder="test placeholder"
:height="200"
@change="change"
/>
</template>
<script>
import Codemirror from "codemirror-editor-vue3";
// language
import "codemirror/mode/javascript/javascript.js";
// theme
import "codemirror/theme/dracula.css";
import { ref } from "vue";
export default {
components: { Codemirror },
setup() {
const code = ref(`
var i = 0;
for (; i < 9; i++) {
console.log(i);
// more statements
}`);
return {
code,
cmOptions: {
mode: "text/javascript", // Language mode
theme: "dracula", // Theme
lineNumbers: true, // Show line number
smartIndent: true, // Smart indent
indentUnit: 2, // The smart indent unit is 2 spaces in length
foldGutter: true, // Code folding
styleActiveLine: true, // Display the style of the selected row
},
};
},
};
</script>
The codemirror basic style has been introduced inside the codemirror-editor-vue3
plugin, and there is no need to repeatedly introduce the following styles when using:
// base style
import "codemirror/lib/codemirror.css";
import "codemirror/mode/css/css.js";
1.0.1
2022-01-04
FAQs
CodeMirror component for Vue3
The npm package codemirror-editor-vue3 receives a total of 3,843 weekly downloads. As such, codemirror-editor-vue3 popularity was classified as popular.
We found that codemirror-editor-vue3 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.