Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Nriver/copy-code-block-widget
Double click to copy code block
https://github.com/Nriver/copy-code-block-widget
trilium trilium-plugin trilium-widget
Last synced: about 1 month ago
JSON representation
Double click to copy code block
- Host: GitHub
- URL: https://github.com/Nriver/copy-code-block-widget
- Owner: Nriver
- License: agpl-3.0
- Created: 2024-05-09T05:49:17.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-10-22T01:04:45.000Z (about 2 months ago)
- Last Synced: 2024-10-23T00:06:37.487Z (about 2 months ago)
- Topics: trilium, trilium-plugin, trilium-widget
- Language: JavaScript
- Homepage:
- Size: 87.9 KB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-trilium - Copy Code Block - palette](https://img.shields.io/github/last-commit/Nriver/copy-code-block-widget) (⚙️ Widgets)
README
# Copy Code Block Widget
[中文说明](README_CN.md)
Please stand up and stretch your body for a while if you see this :)
Hello! If you appreciate my creations, kindly consider [backing me](#donation). Your support is greatly appreciated. Thank you!
**Enhance Your Experience**
Copy code block widget for Trilium. Double click to copy code block content in Trilium.
# Screenshots
## Double click to copy
![overall look](docs/copy1.gif)
## Multi-language support
![overall look](docs/copy2.gif)
# How to Install
1. Download the zip file from the [release page](https://github.com/Nriver/copy-code-block-widget/releases).
2. Right-click note tree in Trilium and click import, uncheck `Safe Import`.
3. Restart Trilium Notes or use `ctrl+r` to reload the interface.
4. Open a `Text` note, double-click on the code block.
5. Have fun.# Hints
1. You can tweak configs in the `config` subnote.
2. i18n support, check the `translations` subnote for the translated texts.
3. There will be a notification telling you have successfully copied the code block :)P.S. If this widget does not work in your client or web browser, try increasing the `executeDelay` in `config` to better suit your settings.
# Why I Made This?
There is no copy button in Trilium due to the upstream CKEditor's lack of this feature. The related issue https://github.com/ckeditor/ckeditor5/issues/9774 has not been touched for 3 years until now. I would assume this won't be fixed in the upstream. So, I made an implementation by myself.
# Donation
Ko-fi:
[![Support Me on Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/nriver)Alipay:
![Alipay](https://github.com/Nriver/trilium-translation/raw/main/docs/alipay.png)WeChat Pay:
![WeChat Pay](https://github.com/Nriver/trilium-translation/raw/main/docs/wechat_pay.png)