├── .eslintignore
├── .gitignore
├── config
├── demo.env.js
├── prod.env.js
├── dev.env.js
└── index.js
├── Assets
└── desc.png
├── .babelrc
├── src
├── index.js
└── components
│ └── Simditor.vue
├── .editorconfig
├── example
├── index.html
├── main.js
└── App.vue
├── docs
└── index.html
├── README.md
├── .eslintrc.js
└── package.json
/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | config/*.js
3 | dist/
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | npm-debug.log
4 |
--------------------------------------------------------------------------------
/config/demo.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"demo"'
3 | }
4 |
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"'
3 | }
4 |
--------------------------------------------------------------------------------
/Assets/desc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/njleonzhang/vue-simditor/HEAD/Assets/desc.png
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["es2015", "stage-2"],
3 | "plugins": ["transform-runtime"],
4 | "comments": false
5 | }
6 |
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var prodEnv = require('./prod.env')
3 |
4 | module.exports = merge(prodEnv, {
5 | NODE_ENV: '"development"'
6 | })
7 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import Simditor from './components/Simditor'
2 |
3 | Simditor.install = function(Vue) {
4 | Vue.component(Simditor.name, Simditor)
5 | }
6 |
7 | export default Simditor
8 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/example/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vue-data-tables
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vue-data-tables
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vue-simditor
2 | vue 2.0 wrapper for simditor
3 |
4 | # install and usage
5 |
6 | `npm install vue-simditor`
7 |
8 | # [online demo](https://njleonzhang.github.io/vue-simditor/)
9 |
10 | # usage
11 | check the [example](https://github.com/njleonzhang/vue-simditor/blob/master/example/App.vue) for usage.
12 |
--------------------------------------------------------------------------------
/example/main.js:
--------------------------------------------------------------------------------
1 | // The Vue build version to load with the `import` command
2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3 | import Vue from 'vue'
4 | import App from './App'
5 |
6 | /* eslint-disable no-new */
7 | new Vue({
8 | el: '#app',
9 | template: '',
10 | components: { App }
11 | })
12 |
--------------------------------------------------------------------------------
/example/App.vue:
--------------------------------------------------------------------------------
1 |
2 | .vue-simditor
3 | simditor(
4 | :content='initContent',
5 | :options='options',
6 | @change='change')
7 |
8 |
9 |
35 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parser: 'babel-eslint',
4 | parserOptions: {
5 | sourceType: 'module',
6 | },
7 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
8 | extends: 'standard',
9 | // required to lint *.vue files
10 | plugins: [
11 | 'html'
12 | ],
13 | // add your custom rules here
14 | 'rules': {
15 | // allow paren-less arrow functions
16 | 'arrow-parens': 0,
17 | // allow async-await
18 | 'generator-star-spacing': 0,
19 | 'space-before-function-paren': [2, 'never'],
20 | // allow debugger during development
21 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/components/Simditor.vue:
--------------------------------------------------------------------------------
1 |
2 | .editor-wrapper
3 | textarea#editor
4 |
5 |
6 |
59 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | // see http://vuejs-templates.github.io/webpack for documentation.
2 | var path = require('path')
3 |
4 | module.exports = {
5 | build: {
6 | env: require('./prod.env'),
7 | assetsRoot: path.resolve(__dirname, '../dist'),
8 | assetsSubDirectory: '/',
9 | assetsPublicPath: '/',
10 | productionSourceMap: false,
11 | // Gzip off by default as many popular static hosts such as
12 | // Surge or Netlify already gzip all static assets for you.
13 | // Before setting to `true`, make sure to:
14 | // npm install --save-dev compression-webpack-plugin
15 | productionGzip: false,
16 | productionGzipExtensions: ['js', 'css']
17 | },
18 | demo: {
19 | env: require('./demo.env'),
20 | assetsRoot: path.resolve(__dirname, '../docs'),
21 | assetsSubDirectory: '',
22 | assetsPublicPath: '',
23 | productionSourceMap: false,
24 | // Gzip off by default as many popular static hosts such as
25 | // Surge or Netlify already gzip all static assets for you.
26 | // Before setting to `true`, make sure to:
27 | // npm install --save-dev compression-webpack-plugin
28 | productionGzip: false,
29 | productionGzipExtensions: ['js', 'css']
30 | },
31 | dev: {
32 | env: require('./dev.env'),
33 | port: 8089,
34 | assetsSubDirectory: 'static',
35 | assetsPublicPath: '/',
36 | proxyTable: {},
37 | // CSS Sourcemaps off by default because relative paths are "buggy"
38 | // with this option, according to the CSS-Loader README
39 | // (https://github.com/webpack/css-loader#sourcemaps)
40 | // In our experience, they generally work as expected,
41 | // just be aware of this issue when enabling this option.
42 | cssSourceMap: false
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-simditor",
3 | "version": "0.0.3",
4 | "description": "vue 2.0 wrapper for simditor",
5 | "author": "njleonzhang ",
6 | "main": "dist/vue-simditor.js",
7 | "homepage": "https://github.com/njleonzhang/vue-simditor",
8 | "scripts": {
9 | "dev": "node build/dev-server.js",
10 | "build": "node build/build.js",
11 | "demo": "node build/build-demo.js",
12 | "lint": "eslint --ext .js,.vue src"
13 | },
14 | "dependencies": {
15 | "vue": "^2.1.0",
16 | "jquery": "^3.1.1",
17 | "simditor": "^2.3.6"
18 | },
19 | "devDependencies": {
20 | "autoprefixer": "^6.4.0",
21 | "babel-core": "^6.0.0",
22 | "babel-eslint": "^7.0.0",
23 | "babel-loader": "^6.0.0",
24 | "babel-plugin-transform-runtime": "^6.0.0",
25 | "babel-preset-es2015": "^6.0.0",
26 | "babel-preset-stage-2": "^6.0.0",
27 | "babel-register": "^6.0.0",
28 | "chalk": "^1.1.3",
29 | "connect-history-api-fallback": "^1.1.0",
30 | "css-loader": "^0.25.0",
31 | "eslint": "^3.7.1",
32 | "eslint-config-standard": "^6.1.0",
33 | "eslint-friendly-formatter": "^2.0.5",
34 | "eslint-loader": "^1.5.0",
35 | "eslint-plugin-html": "^1.3.0",
36 | "eslint-plugin-promise": "^3.4.0",
37 | "eslint-plugin-standard": "^2.0.1",
38 | "eventsource-polyfill": "^0.9.6",
39 | "express": "^4.13.3",
40 | "extract-text-webpack-plugin": "^1.0.1",
41 | "file-loader": "^0.9.0",
42 | "function-bind": "^1.0.2",
43 | "html-webpack-plugin": "^2.8.1",
44 | "http-proxy-middleware": "^0.17.2",
45 | "json-loader": "^0.5.4",
46 | "node-sass": "^4.0.0",
47 | "opn": "^4.0.2",
48 | "ora": "^0.3.0",
49 | "pug": "^2.0.0-beta6",
50 | "sass-loader": "^4.1.0",
51 | "semver": "^5.3.0",
52 | "shelljs": "^0.7.4",
53 | "url-loader": "^0.5.7",
54 | "vue-loader": "^10.0.0",
55 | "vue-style-loader": "^1.0.0",
56 | "vue-template-compiler": "^2.1.0",
57 | "webpack": "^1.13.2",
58 | "webpack-dev-middleware": "^1.8.3",
59 | "webpack-hot-middleware": "^2.12.2",
60 | "webpack-merge": "^0.14.1"
61 | },
62 | "engines": {
63 | "node": ">= 4.0.0",
64 | "npm": ">= 3.0.0"
65 | }
66 | }
67 |
--------------------------------------------------------------------------------