From 6e5f6cc739c2d8fa03ddacdeafa63d9b8c45d6ea Mon Sep 17 00:00:00 2001 From: Eric Solomon Date: Tue, 14 Feb 2017 03:21:23 -0600 Subject: [PATCH 1/2] Fix font color for dark theme rename folder modal --- browser/main/modals/RenameFolderModal.styl | 1 + 1 file changed, 1 insertion(+) diff --git a/browser/main/modals/RenameFolderModal.styl b/browser/main/modals/RenameFolderModal.styl index b83aeb15..61195490 100644 --- a/browser/main/modals/RenameFolderModal.styl +++ b/browser/main/modals/RenameFolderModal.styl @@ -75,3 +75,4 @@ body[data-theme="dark"] .control-input border-color $ui-dark-borderColor + color $ui-dark-text-color From f7fb5319027008103d6dadbca804714eeba3d17e Mon Sep 17 00:00:00 2001 From: kostaldavid8 Date: Fri, 17 Feb 2017 10:03:53 +0100 Subject: [PATCH 2/2] Fixed image drag and drop Added escaping and changed function that wasn't working --- browser/components/CodeEditor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/browser/components/CodeEditor.js b/browser/components/CodeEditor.js index 6f19c49f..77fc5fd2 100644 --- a/browser/components/CodeEditor.js +++ b/browser/components/CodeEditor.js @@ -168,13 +168,13 @@ export default class CodeEditor extends React.Component { e.preventDefault() let imagePath = e.dataTransfer.files[0].path let filename = path.basename(imagePath) - let imageMd = `![${filename}](${imagePath})` + let imageMd = `![${encodeURI(filename)}](${encodeURI(imagePath)})` this.insertImage(imageMd) } insertImage (imageMd) { - const textarea = this.editor.getInputField() - textarea.value = textarea.value.substr(0, textarea.selectionStart) + imageMd + textarea.value.substr(textarea.selectionEnd) + const cm = this.editor + cm.setValue(cm.getValue() + imageMd) } render () {