-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paste image to card description #4297
Conversation
6ea1d16
to
ffa480a
Compare
Signed-off-by: rija.propitech <[email protected]>
<!-- | ||
- @copyright Copyright (c) 2022 Julius Härtl <[email protected]> | ||
- | ||
- @author Julius Härtl <[email protected]> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh, not sure this is intended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcelklehr I'm not sure which one is right. The content is coming from a previous file though AttachmentUploadProgress.vue will be created in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
src/components/card/Description.vue
Outdated
let lineUpatedLength = 0 | ||
|
||
for (let i = 0; i < descStringLines.length; i++) { | ||
if (i === cursor.line) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a for-loop here seems excessive, if you only want to change one line. How anout this?
if (descStringLines[cursor.line]) {
const line = descStringLines[cursor.line]
descStringLines[cursor.line] = line.substring(0, cursor.ch) + attachmentString + line.substring(cursor.ch)
lineUpatedLength = descStringLines[cursor.line].length
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcelklehr it should work. I've changed this way.
this.loading = true | ||
event.preventDefault() | ||
for (const file of files) { | ||
this.onLocalAttachmentSelected(file, 'file').then(this.addLastAttachmmentOnCursor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phew, 'onLocalAttachmentSelected' should probably have been named differently, heh :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not your fault though, of course
<script> | ||
|
||
export default { | ||
name: 'AttachmentUploadProgress', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good thinking to extract this component! 👍
return | ||
} | ||
|
||
const clipboardData = event.clipboardData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does the variable event
come from?
} | ||
|
||
this.loading = true | ||
event.preventDefault() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In chrome nothing is inserted at all for me, for some reason :/ |
This comment was marked as duplicate.
This comment was marked as duplicate.
Thank you for considering my contribution. After further consideration, I have decided to withdraw my pull request. I believe that other developers can better address the changes or additions needed for this project. I look forward to seeing how the project progresses. Feel free to continue the discussion without me. Best wishes to the team! |
Summary
on paste image in edition of card description. We insert image as card attachement and in card description. PR related to this issue
Checklist