vue-code
A code editor based on Vue.js and CodeMirror.
Installation
$ npm i vue-code
Usage
;;// require additional CodeMirror files;;el: '#my-selector'components:VueCodedata:code: 'console.log("hello, world");'options:mode: 'javascript'methods:{console;};
For more detailed usage, please see demo.
Document
Content is passed to the component by v-model
.
-
Props:
-
options
An object to be passed directly to CodeMirror.
-
-
Events:
-
ready
Emitted when CodeMirror instance is ready and passed as the only argument.
-