Code Block editor fixes + Image editor UI

This commit is contained in:
NGPixel
2016-09-12 00:00:52 -04:00
parent b524cd9f79
commit 10441de4e8
7 changed files with 54 additions and 7 deletions

View File

@@ -32,7 +32,7 @@ let vueCodeBlock = new Vue({
if(mde.codemirror.doc.somethingSelected()) {
mde.codemirror.execCommand('singleSelection');
}
let codeBlockText = '```' + vueCodeBlock.modeSelected + '\n' + codeEditor.getValue() + '\n```';
let codeBlockText = '\n```' + vueCodeBlock.modeSelected + '\n' + codeEditor.getValue() + '\n```\n';
mde.codemirror.doc.replaceSelection(codeBlockText);
vueCodeBlock.cancel();

View File

@@ -88,11 +88,19 @@ if($('#mk-editor').length === 1) {
{
name: "image",
action: (editor) => {
//todo
$('#modal-editor-image').slideDown();
},
className: "fa fa-image",
title: "Insert Image",
},
{
name: "file",
action: (editor) => {
//todo
},
className: "fa fa-file-text-o",
title: "Insert File",
},
'|',
{
name: "inline-code",
@@ -106,7 +114,7 @@ if($('#mk-editor').length === 1) {
return '`' + s + '`';
});
editor.codemirror.doc.replaceSelections(curSel);
},
className: "fa fa-terminal",
title: "Inline Code",