zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.2k stars 1.9k forks source link

Pasting video links is annoying #564

Closed spantaleev closed 5 years ago

spantaleev commented 5 years ago

I'm running 0.32.4, using Electron on Archlinux from the AUR (trilium-bin).

Every time I paste a video link (YouTube, Vimeo, ..), the link gets converted to an embed element.

It's especially annoying when putting links in lists. It would expand them to something huge and useless. I'd rather those links get converted to something clickable. Yet they remain plain-text (for other links) and video embeds for video-service links.

It looks like this is regular CKEditor behavior, so I'm not sure how much flexibility we have in tweaking it and what the general consensus around this might be.

The video embed does not even work (I've only tested in Electron so far). I can see s a static image preview, but the play button is not clickable, nor can I do anything to open the video. Perhaps that's another bug?

zadam commented 5 years ago

Hello, you are right, this is pretty annoying. I "fixed" it by disabling the whole media embed plugin in the ckeditor. Embedding might be useful in few cases, but I don't think it's expected to have this on the paste of any embeddable link and currently it seems it's not possible to selectively disable just this behavior. Also as you mentioned, opening/playing the media does not actually work (quick test did not reveal the cause).

In the meantime, one possible workaround is to press ctrl-z after the paste which will convert it back to plain text (not to link though).

CKEditor so far does not have automatic recognition of links on paste so you have to manually create a link (CTRL-K). This is actually even better workaround anyway.

spantaleev commented 5 years ago

Disabling it completely sounds great!

Thank you!

fivestones commented 4 years ago

I'd love to have the possibility to embed audio or video content though

cptvincer commented 3 years ago

Wait what? But i was looking exactly for that function!

Cant this be a setting? i think most peoples use case is towards embeding, rarely pasting too many links in one note to not have embeds.

How can videos be embeded in trilium now? I couldnt find it. Or any way to activate the plugin back?

First time i saw a single comment/request turning a feature off in an app.

Any workarounds?

PS: i really think this should be a setting. Toggleable on or off.

gdtiti commented 9 months ago

can you add video player for note?