mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 18:26:26 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16061a7eba | ||
|
|
8beb661af4 | ||
|
|
f7fb531902 | ||
|
|
b32b38bb0d | ||
|
|
6e5f6cc739 |
@@ -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 = ``
|
||||
let imageMd = `})`
|
||||
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 () {
|
||||
|
||||
@@ -75,3 +75,4 @@ body[data-theme="dark"]
|
||||
|
||||
.control-input
|
||||
border-color $ui-dark-borderColor
|
||||
color $ui-dark-text-color
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "boost",
|
||||
"version": "0.8.5",
|
||||
"version": "0.8.6",
|
||||
"description": "Boostnote",
|
||||
"main": "index.js",
|
||||
"license": "GPL-3.0",
|
||||
|
||||
Reference in New Issue
Block a user