mirror of
https://github.com/logseq/logseq.git
synced 2026-05-02 09:56:31 +00:00
feat: add macro video to embed various video URLs
This macro replaces `youtube`, `vimeo` and `bilibili` macros. For backward compatibility, users can still use above macros, but they can't access those commands from the commands menu anymore.
This commit is contained in:
@@ -2907,11 +2907,9 @@
|
||||
(html-link-format! text)
|
||||
|
||||
(and (gp-util/url? text)
|
||||
(or (string/includes? text "youtube.com")
|
||||
(string/includes? text "youtu.be"))
|
||||
(mobile-util/is-native-platform?))
|
||||
(commands/simple-insert! (state/get-edit-input-id) (util/format "{{youtube %s}}" text) nil)
|
||||
|
||||
(boolean (text/get-matched-video text)))
|
||||
(commands/simple-insert! (state/get-edit-input-id) (util/format "{{video %s}}" text) nil)
|
||||
|
||||
(and (gp-util/url? text)
|
||||
(string/includes? text "twitter.com")
|
||||
(mobile-util/is-native-platform?))
|
||||
|
||||
Reference in New Issue
Block a user