ninja33 / ODH

A chrome extension to show online dictionary content.
MIT License
1.43k stars 244 forks source link

Add URL as hyperlink #178

Closed johan456789 closed 3 years ago

johan456789 commented 3 years ago

現在ODH加入到Anki卡片的URL是純文字,如果能弄成超連結會更方便些。

ninja33 commented 3 years ago

插件只是保留了原始信息,怎么展现是anki模板的功能

johan456789 commented 3 years ago

AnkiConnect 支援HTML, 所以只要加上HTML碼就好了。在Anki,貼上一個URL本來就會自動變成超連結(至少在Mac上是這樣),所以我想這個行為可能更適合作為預設。

Click to show request ```json { "action": "addNote", "version": 6, "params": { "note": { "deckName": "Default", "modelName": "Basic", "fields": { "Front": "Example", "Back": "http://example.com" }, "tags": [] } } } ```

https://user-images.githubusercontent.com/14802181/104206165-30631b00-546a-11eb-98fd-c770cd7ea717.mov

ninja33 commented 3 years ago

技术上不是问题,如果是短的url还好,但如果浏览时产生的url很长,其实不太适合放在anki学习界面。

而且这样做,也违背了内容和展示分离的原则,我之前做的anki模版有很多都是内嵌url,展示的时候会显示“原文网址”或者“url” 字样,点击后跳转该网页

发自我的iPhone

在 2021年1月12日,00:10,johan456789 notifications@github.com 写道:

 AnkiConnect 支援HTML, 所以只要加上HTML碼就好了。在Anki,貼上一個URL本來就會自動變成超連結(至少在Mac上是這樣),所以我想這個行為可能更適合作為預設。

Click to show request https://user-images.githubusercontent.com/14802181/104206165-30631b00-546a-11eb-98fd-c770cd7ea717.mov

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.