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] Add links and images directly in the post editor, not via a reference at the bottom #725

Closed
thopanX opened this issue Apr 20, 2024 · 6 comments

Comments

@thopanX
Copy link
Contributor

thopanX commented Apr 20, 2024

Would you consider making it configurable, how images and links (via the toolbar) are inserted into the Markdown?

This is probably a personal preference, but I really like the [XXX](https:…) style more than the "footnotes style". I can at once see where the link is leading or what image I inserted, instead of having to scroll to the bottom of the editor.

grafik

@danpros
Copy link
Owner

danpros commented Apr 20, 2024

Yes, sometimes it is quite confusing, to achieve this we have to edit some parts of the Markdown.Editor.js example:

chunk.endTag = "][" + num + "]";

@danpros
Copy link
Owner

danpros commented Apr 20, 2024

It seems that changing the code in that line is enough:

// var num = that.addLinkDef(chunk, linkDef);
chunk.startTag = isImage ? "![" : "[";
chunk.endTag = "](" + properlyEncoded(link)+ ")";

@thopanX
Copy link
Contributor Author

thopanX commented Apr 20, 2024

Is there some sort of caching going on? I edited the line as you instructed and overwrote the file on the server, but images are still inserted with a footnote.

I opened the admin in a new browser window, too, in case that would pull the admin freshly.

Thanks that you're looking into this!

@danpros
Copy link
Owner

danpros commented Apr 20, 2024

Its browser caching, try to reload the page in editor, if you are using cloudflare clear the cloudflare cache.

@thopanX
Copy link
Contributor Author

thopanX commented Apr 22, 2024

That worked, thanks!

@thopanX thopanX closed this as completed Apr 22, 2024
@danpros
Copy link
Owner

danpros commented Apr 22, 2024

I will include it in future release

danpros added a commit that referenced this issue Apr 27, 2024
See #726 and markdown like link/image see #725
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

2 participants