Skip to content
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

Feature Request: Ability to easily get the full path of the image #134

Open
kiyoka opened this issue Aug 11, 2022 · 6 comments
Open

Feature Request: Ability to easily get the full path of the image #134

kiyoka opened this issue Aug 11, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@kiyoka
Copy link
Contributor

kiyoka commented Aug 11, 2022

Unotes cannot easily get file paths to edit local images.
It would be useful if the path could be gotten directly from the displayed image.

Current behavior (Unotes v1.4.3)

When I hover the mouse pointer over the displayed image, nothing happens.

Desired behavior (Implementation Plan)

  1. Embed the image ". /img/green1.png" into the document
    1

  2. When the mouse pointer hovers over the image, a clipboard copy button appears.
    4

  3. You can get the full path of the image by button.
    4

This is clipboard data.

file:///c:/User/user1/sample/img/green1.png
@ryan-mcalister
Copy link
Contributor

I think this would be a great feature. Thanks for wanting to contribute to Unotes!

@ryanmcalister
Copy link
Owner

Thanks for the implementation plan. Looks good!

@kiyoka
Copy link
Contributor Author

kiyoka commented Aug 16, 2022

Thanks for the implementation plan. Looks good!

I'm trying to implement it.
https://github.com/kiyoka/unotes/tree/fix_issue_134.tmp1

Unfortunately, I am stuck because of a bug in tui.editor 2.5.
When I enclose img tags with div tag, the img nodes multiply when I switch between markdown mode and WYSIWYG mode.
I need to fix the bug on the tui.editor side, so it will take a while.

@kiyoka
Copy link
Contributor Author

kiyoka commented Aug 20, 2022

I'm trying to implement it. https://github.com/kiyoka/unotes/tree/fix_issue_134.tmp1

Unfortunately, I am stuck because of a bug in tui.editor 2.5. When I enclose img tags with div tag, the img nodes multiply when I switch between markdown mode and WYSIWYG mode. I need to fix the bug on the tui.editor side, so it will take a while.

I tried enclosing img tags with div tags in tui.editor 3.2.x, I found no bugs of image multiplication in tui.editor 3.2.x.
Therefore, I would like to bump up tui.editor version to the 3.2.x series before implementing this feature.
https://github.com/kiyoka/tui.editor/tree/kiyoka/customhtmlrenderer-test

It was very difficult to build the tui.editor 2.x series and I gave up working with 2.x before fixing the 2.x bugs.

@ryanmcalister
Copy link
Owner

Updating to 3.x has been on the roadmap so I think if you are able to make it happen that would be great. I haven't had a chance to try 3.2 yet so I'm not sure how difficult that will be. It might take a bit of extra effort to get the theming to work but I'm not sure. Let me know if you run into difficulties...

@kiyoka
Copy link
Contributor Author

kiyoka commented Aug 21, 2022

OK.
I will register an issue for upgrading to tui.editor 3.x as a Feature Request.
Then I will actually work on it.
I think this ticket should be done independently for tui.editor 3.x support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants