See CHANGELOG to see more about recently changes.
If you are interested in the old version, please select coditor-old branch in this repo. if there is something that you think needs to be add on coditor, open an issue to have a discussion about that.
npm install coditor --save
cd coditor && npm install
npm run dev
Your browser will be automatically launch into
main.js. See how to customize coditor.
You need to customize your own preferences for coditor. This include:
node_modules/codemirror/theme/So, you must import like any other js module. For example:
//import monokai theme import monokai from 'codemirror/theme/monokai.css'
srcfolder to the new value (monokai).
See literal 1 of Switch to another theme. You must import each themes that you want to use.
You must specified for each props the theme that you want to use. (see props for coditor)
srcfolder you must import each library that coditor should be supported. See here all modes that support codemirror. For example:
import clike from 'codemirror/mode/clike/clike.js'
Example 2: Add support for php
import php from 'codemirror/mode/php/php.js'
Now, you can specify in props what programming language will be use for each tab.
config.json you must specified a type request (get, post, etc) and url. There are others settings for vue-resource (see here more settings and type of request)
In development mode you can test this option. When you click get the current editor information button you will be receive a response of the server and will be show in console. (only for methods get and post)
npm run build to build the project minified version. Inside the
dist folder will you have minified assets.
If you already built assets, continue with the tutorial. If you haven't already done so, please see how to customize coditor.
Now, you can execute your application and by default you will see only one tab with the options that you configured into
|[string]||name||a name whatever|
If you want init with a piece of code, you must specified a third key:value in the configs:
|string||value||piece of code|
See below the basic and advanced settings.
To a basic configuration for each tab, you must specified minimum two values. (name and mode)
To have more control over the each tab, see here all configuration options for codemirror. (By default, theme is set with coditor theme and lineNumbers is true, but you can changes this values)
Example advanced setting:
window.coditor object containt two values:
whether you specified http config or not, also will be have the value information that was captured when clicked button get the current editor information.
You are welcome to contribute to this repo with anything you think is useful. fixes are more than welcome.
If you need help using coditor, or have found a bug, please create an issue on the GitHub repo