refactor: editor codeblock -> Vue component

This commit is contained in:
NGPixel
2017-05-28 14:34:50 -04:00
parent ebe288a5b2
commit f577a8134e
14 changed files with 295 additions and 303 deletions

View File

@@ -2,8 +2,21 @@
export default {
namespaced: true,
state: {},
state: {
busy: false,
insertContent: ''
},
getters: {},
mutations: {},
actions: {}
mutations: {
busyChange: (state, busyState) => { state.shown = busyState },
insertContentChange: (state, newContent) => { state.insertContent = newContent }
},
actions: {
busyStart({ commit }) { commit('busyChange', true) },
busyStop({ commit }) { commit('busyChange', false) },
insert({ commit }, content) {
commit('insertContentChange', content)
wikijs.$emit('editor/insert')
}
}
}