fixed code block bugs

Please enter the commit message for your changes. Lines starting
This commit is contained in:
fa93hws 2017-05-18 15:18:01 +10:00
parent e0389177e3
commit 661307f5db
2 changed files with 2 additions and 1 deletions

View File

@ -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(() => {

View File

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