[PLUGIN]Insert Image EX - No more uploading images into database 【插件】插入图片EX - 不需要将图片上传到数据库 #1972
Unanswered
XiaofengdiZhu
asked this question in
Show and tell
Replies: 1 comment 1 reply
-
in trilium 0.48.5 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Have a look first:

先看图:
I don't like uploading images into this software's database which makes the database bigger and bigger but I can't clear deleted files conveniently. So I write this plugin.
我讨厌这个软件默认把图片上传到数据库,因为这会让数据库文件越来越大,而这软件没有提供方便清理已删除文件的方式,所以我写了这个插件治治。
I'm not a professional coder and this's is my first time to code Electron, If you find any bug, please report me. By the way, it costs me about 20 hours to write this simple plugin…
我不是专业的程序员,这也是我第一次接触Electron编程,如果你发现任何bug请告诉我。顺便这小玩意花了我大概20小时……
How to use 如何使用
Create a new JS frontend note with attr
#run=frontendStartup
and these code:创建一个JS frontend的笔记,attr写上
#run=frontendStartup
,内容写:Create a new JS backend note with attr
#run=backendStartup
and these code:创建一个JS backend的笔记,attr写上
#run=backendStartup
,内容写:Close Trilium and launch it, wait 10 seconds, now you can use it like the gif on the top.
关闭Trilium再打开,等10秒即可像镇楼图一样使用了。
Other Feature其他特性
Double clicking on the image can open this image by your default image viewer or web browser.
双击图片会使用默认图片查看器或网页浏览器打开它
Attention注意
require('electron')
which is not in API), I don't know the author of Trilium will ban those functions and this plugin won't work. 我好像用了些不太安全的方法(例如不在API里的require('electron')
),不知道Trilium作者以后会不会禁用那些函数,然后我的插件就炸了。Beta Was this translation helpful? Give feedback.
All reactions