Browse Source

Merge pull request #106 from fa93hws/fa93hws

fixed code block bugs
pull/112/head
Nicolas Giard 7 years ago
committed by GitHub
parent
commit
f5cce0e1f4
2 changed files with 1 additions and 2 deletions
  1. 1
      client/js/components/editor-codeblock.js
  2. 2
      client/js/components/editor.js

1
client/js/components/editor-codeblock.js

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

2
client/js/components/editor.js

@ -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