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

[Request] Image popup : pre-fill the URI to the media #36

Open
Heraes-git opened this issue Apr 8, 2019 · 6 comments
Open

[Request] Image popup : pre-fill the URI to the media #36

Heraes-git opened this issue Apr 8, 2019 · 6 comments

Comments

@Heraes-git
Copy link

In the context of HTML generation of images (<img>) and replacing of the native markdown syntax, the actual image manager looks like this :

2019-04-05_18h46m12s_sublime_text

Typing directly a media name doesn't work : we have to type the entire path to it.

Desired behavior

When opening the popup, several solutions could be feasible :

  1. The popup automatically fill the source field, with the page's URI as a prefix. The user could finish the job by typing a resource name.
  2. The popup propose to browse the actual page's medias, allowing the user to select a file.
  3. The user just type the name of the media, and the plugin will add the prefix during the generation of the src="" attribute.

And even, a last feature would be appreciated :

  1. The user can click'n'drag from the editor media library and dump it in the source field (wich isn't feasible for now, given that the popup send all the rest of the editor in background). Any of the n°1 or n°3 solution could terminate the job.
@OndraX
Copy link

OndraX commented Sep 10, 2019

Also looking for any sort of solution.

@newbthenewbd
Copy link
Owner

Actually, when the Insert button next to the media is clicked, the Source field should already be filled by the plugin, all the way since v1.1.0; if this does not work, there might be some sort of a browser compatibility issue behind it.

However, the soon-to-be next release of the plugin both deprecates the semi-absolute paths in favor of fully relative ones akin to these generated by Grav for Markdown, and makes dragging and dropping the media into the editor work correctly. Provided that this uses some new, complicated and unfortunately very hacky javascripts, and that there is thus a possibility of compatibility issues, I would love to receive feedback on the new implementation, installable as explained here.

Thanks!

@Heraes-git
Copy link
Author

@newbthenewbd Hi, and sorry for the late answer. I've just installed your knew testing version, and it works ! :) You're the man !

@newbthenewbd
Copy link
Owner

Not at all late, or so I insist after taking over five months to answer the request... 🙃 Should it randomly decide to somehow stop working within the (hopefully only) few days before a full-fledged release (or, worse yet, after that release is out), feel free and welcome to notify.

Thanks for the feedback!

@nounours18200
Copy link

I use TinyMCE Editor Integration v1.2.7 provided with the latest version of GRAV , and it is still impossible to browse a directory in order to chose the image to be inserted.
This a major pain and so a major request like Romarain said !
@Romarain and @newbthenewbd : you say that it works with a version issued in September 2019: how is it possible to get this "browse" function working ?

@newbthenewbd
Copy link
Owner

@nounours18200 Apologies for the late response. Indeed, to be clear, the latest version of the plugin does not have either an autocomplete feature or a file browser (that could browse the media of other pages or what have you) built in - which is the reason I've kept this feature request open.

However, in v1.3.0 it is possible to drag and drop the page's media into the editor, and, as in earlier versions, to click the Add button next to the media. These are the closest alternatives that we have right now in order to add the media comfortably.

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

No branches or pull requests

4 participants