CodeMirror.js wrapper for vue
Needs jQuery and Vue to be available globally
npm install libj-vue-comp-code-editing
- value (String) | default: '' html or js or css code
- canCopy (Boolean) | default: true can user copy the code using a button or not
- visible (Boolean) | default: false visibility of component
- getHtml() => String returns current html
- setHtml(html) sets current html
import 'libj-vue-comp-code-editing/dist/libj-vue-comp-code-editing.default.min.css'
import 'libj-vue-comp-code-editing'
//Now, j-code-editor is available globally
You'll need a separate .scss file
// Set variables here
.
.
.
@import 'libj-vue-comp-code-editing/index.scss';
// Now override classes
.
.
.
$j-code-editor-height: 400px !default;
- Run this in a separate command line to start node server
node server.js
- Run one of the following to re-create bundles
npm run dev
npm run dev:watch
- Navigate to http://localhost:3000
npm run build
npm run build:watch