Skip to content
Merged
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7e3ffd0
Add simple attachment button
newhinton Feb 23, 2022
90b4238
fix lint
newhinton Feb 24, 2022
070fe81
overhaul buttons
newhinton Feb 27, 2022
7490913
use original filename after upload
newhinton Feb 27, 2022
112bc0a
Merge branch 'master' into feature/74/imageupload
newhinton Feb 27, 2022
8b293c2
add basic error checking for filesize
newhinton Feb 27, 2022
2525aaa
fix lint
newhinton Feb 27, 2022
688fbd5
fix lint
newhinton Mar 2, 2022
f737234
Add simple attachment button
newhinton Feb 23, 2022
fc173ee
fix lint
newhinton Feb 24, 2022
da4a3a6
overhaul buttons
newhinton Feb 27, 2022
ab6592d
use original filename after upload
newhinton Feb 27, 2022
4a2385f
add basic error checking for filesize
newhinton Feb 27, 2022
c08c3f2
fix lint
newhinton Feb 27, 2022
73ed711
fix lint
newhinton Mar 2, 2022
54ed311
use Actions and ActionButton components
korelstar Mar 13, 2022
096e042
Merge remote-tracking branch 'origin/feature/74/imageupload' into fea…
newhinton Mar 14, 2022
6facc00
Add 5px margin to new menu
newhinton Mar 14, 2022
9fc4724
let the noteservice fail properly when php-memory-limit is too low
newhinton Mar 14, 2022
4f29113
properly calculate image path offset for existing images
newhinton Mar 14, 2022
eeae9c3
refocus and add newline after image text was inserted
newhinton Mar 14, 2022
df2a1b3
fix lint
newhinton Mar 14, 2022
beb637f
fix reference to "this"
korelstar Mar 14, 2022
a9d08ce
simplify path operations by using 'path' module
korelstar Mar 14, 2022
12e973e
fix dissappearance of image button
korelstar Mar 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/components/EditorEasyMDE.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<template>
<div class="markdown-editor" @click="onClickEditor">
<textarea />
<div>
<button class="upload-button" @click="onClickUpload">
{{ t('notes', 'Add Attachment') }}
</button>
<div class="markdown-editor" @click="onClickEditor">
<textarea />
</div>
</div>
</template>
<script>
Expand Down Expand Up @@ -66,7 +71,7 @@ export default {
methods: {
initialize() {
const config = Object.assign({
element: this.$el.firstElementChild,
element: this.$el.lastElementChild.firstElementChild,
initialValue: this.value,
renderingConfig: {},
}, this.config)
Expand Down Expand Up @@ -178,7 +183,7 @@ export default {
url: generateUrl('apps/notes') + '/notes/' + id + '/attachment',
data,
})
const name = response.data[0].filename
const name = response.data.filename
const position = {
line: cursor.line,
}
Expand Down Expand Up @@ -317,4 +322,8 @@ export default {
opacity: 0.5;
text-decoration: line-through;
}

.upload-button {
float: right;
}
</style>