vue-wysiwyg
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -10,3 +10,3 @@ // see http://vuejs-templates.github.io/webpack for documentation. | ||
assetsSubDirectory: 'static', | ||
assetsPublicPath: '/', | ||
assetsPublicPath: '/vue-wysiwyg/', | ||
productionSourceMap: true, | ||
@@ -13,0 +13,0 @@ // Gzip off by default as many popular static hosts such as |
{ | ||
"name": "vue-wysiwyg", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A WYSIWYG HTML editor for Vue.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -10,8 +10,9 @@ # vue-wysiwyg | ||
```js | ||
import Editr from "./index.js"; | ||
Vue.use(Editr, {}); // config is optional. more below | ||
import wysiwyg from "vue-wysiwyg"; | ||
Vue.use(wysiwyg, {}); // config is optional. more below | ||
``` | ||
In your components: | ||
```html | ||
<Editr v-model="myHTML" /> | ||
<wysiwyg v-model="myHTML" /> | ||
``` | ||
@@ -18,0 +19,0 @@ |
@@ -7,3 +7,3 @@ import Vue from 'vue'; | ||
image: { | ||
uploadURL: "" | ||
uploadURL: "None" | ||
}, | ||
@@ -10,0 +10,0 @@ |
@@ -5,7 +5,16 @@ import Editr from "./Editr.vue"; | ||
export default { | ||
install: (Vue, options) => { | ||
Vue.component("Editr", Editr); | ||
bus.$set(bus.$data, "options", options); | ||
} | ||
install: (Vue, userOptions = {}) => { | ||
const options = {}, | ||
defaultOptions = bus.$data.options; | ||
for (const key in defaultOptions) { | ||
const userOpt = userOptions[key]; | ||
options[key] = userOpt !== undefined ? userOpt : defaultOptions[key]; | ||
} | ||
bus.$data.options = options; | ||
Vue.component("wysiwyg", Editr); | ||
}, | ||
component: Editr | ||
} |
import Vue from 'vue'; | ||
import App from './App.vue'; | ||
import Editr from "./index.js"; | ||
Vue.use(Editr, {}); | ||
import wysiwyg from "./index.js"; | ||
Vue.use(wysiwyg, {}); | ||
@@ -7,0 +7,0 @@ new Vue({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
187313
542
32
38