Merge pull request #106 from fa93hws/fa93hws

fixed code block bugs
pull/112/head
Nicolas Giard 8 years ago committed by GitHub
commit f5cce0e1f4

@ -50,6 +50,7 @@ module.exports = (mde, mdeModalOpenState) => {
}, },
methods: { methods: {
open: (ev) => { open: (ev) => {
mdeModalOpenState = true;
$('#modal-editor-codeblock').addClass('is-active') $('#modal-editor-codeblock').addClass('is-active')
_.delay(() => { _.delay(() => {

@ -150,8 +150,6 @@ module.exports = (alerts, pageEntryPath, socket) => {
name: 'code-block', name: 'code-block',
action: (editor) => { action: (editor) => {
if (!mdeModalOpenState) { if (!mdeModalOpenState) {
mdeModalOpenState = true
if (mde.codemirror.doc.somethingSelected()) { if (mde.codemirror.doc.somethingSelected()) {
vueCodeBlock.initContent = mde.codemirror.doc.getSelection() vueCodeBlock.initContent = mde.codemirror.doc.getSelection()
} }

Loading…
Cancel
Save