-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
104 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Vue from "vue" | ||
import { default as VueTinymce, TinymceSetting } from ".." | ||
|
||
Vue.component('VueTinymce', VueTinymce) | ||
Vue.use(VueTinymce) | ||
|
||
window.VueTinymce = { TinymceSetting } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,20 @@ | ||
import TinymceSetting from './setting' | ||
import component from './vue-tinymce.vue' | ||
export { TinymceSetting } | ||
export default component | ||
import VueTinymce from './vue-tinymce.vue' | ||
export { TinymceSetting, VueTinymce } | ||
class VuePlugin{ | ||
constructor(){ | ||
const { prefix } = { prefix: "" } | ||
this.prefix = prefix; | ||
} | ||
install(Vue, options={}){ | ||
const prefix = options.prefix || this.prefix | ||
const components = { | ||
VueTinymce | ||
} | ||
Object.keys(components).forEach(key => { | ||
const component = components[key]; | ||
Vue.component(prefix+component.name, component); | ||
}); | ||
} | ||
} | ||
export default new VuePlugin() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters