redimp / otterwiki

A minimalistic wiki powered by python, markdown and git.
https://otterwiki.com
MIT License
648 stars 29 forks source link

Copy code block function not working #159

Closed tvmp closed 3 weeks ago

tvmp commented 3 weeks ago

Hello and thank you for the amazing Wiki!

I am running it in docker compose and everything is working great apart from the copy code block function. Even though I can copy code from the sample pages i.e. here or here, the icon that provides the copy function in my instance is not copying the content of a code block to the clipboard.

I am only using otterwiki locally within my LAN, if that makes any difference. Have I ommitted something?

redimp commented 3 weeks ago

Hey @tvmp, no idea yet what might go wrong. With the sample pages working we can rule out that your browser or the javascript is not working at all, but for the sake of completeness two questions:

tvmp commented 3 weeks ago

Tried with latest Firefox and latest Chrome, no luck in either, even though the same browsers work fine with the sample links above.

F12 in Firefox produced the error below:

Uncaught TypeError: navigator.clipboard is undefined

No idea what that means though! A quick search said it might be because this is run under http instead of https, but I am running the container locally and have no need for https.

tvmp commented 3 weeks ago

I think it won't work otherwise, it needs to be https, not otterwiki's fault so I am closing this. Thanks again!