Ability to Create Dynamic Search Query Blocks Using JS Engine
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Start with the engine.markdown.create and engine.markdown.createBuilder entry points shown in the examples, then compare their output with a native query block in Obsidian reading mode. Done means dynamically generated file:button content renders search results rather than plain text, including when the value is updated through the proposed Meta Bind textarea integration.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi @mProjectsCode,
First of all, thanks for creating this amazing plugin! It's been a great addition to my Obsidian setup.
I wanted to ask if it's possible to dynamically generate native search query blocks using the js-engine plugin. I've been exploring different ways to use the plugin and found that generating JavaScript code blocks works perfectly. However, I'm struggling to create dynamic search query blocks that work in the same way.
Here's what I've tried so far:
let searchQuery = `~~~query
file:button
~~~`;
return engine.markdown.create(searchQuery);
And another attempt:
let markdownBuilder = engine.markdown.createBuilder();
let searchQuery = `file:button`;
markdownBuilder.createCodeBlock('query', searchQuery);
return markdownBuilder;
Unfortunately, neither of these attempts seems to render the search query block correctly in Obsidian.
The output is:
file:button
Instead of the search query result I would get using:
```query
file:button
```
However, this approach does work perfectly for JavaScript code blocks:
let jsCode = `~~~js
var foo = 'bar';
~~~`;
return engine.markdown.create(jsCode);
Or
let markdownBuilder = engine.markdown.createBuilder();
let jsCode = `var foo = 'bar';`;
markdownBuilder.createCodeBlock('js', jsCode);
return markdownBuilder;
I'm aware of the workaround using DataView or DataViewJS for similar tasks, but I'd prefer to use the native search query blocks directly if possible. My ultimate goal is to integrate this with a textarea using the Meta Bind Plugin, so that in reading mode, I can dynamically update and view search results in real-time.
Could you please let me know if it's possible to achieve this using the js-engine plugin? If not, any suggestions or workarounds would be greatly appreciated!
Thanks again for your work on this plugin!
Best regards,
CharlesHaanel
- Ngôn ngữ chính
- TypeScript
- Star
- 192
- Fork
- 15
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mProjectsCode/obsidian-js-engine-plugin
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
ImportJs not working on DesktopĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
mProjectsCode/obsidian-js-engine-plugin#50 · 3 bình luận ·
-
Opening a random note in a NoteĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 42/100
Tất cả issue của mProjectsCode/obsidian-js-engine-plugin
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melgarafael/DeskcommCRM#3000 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
callstackincubator/simlock#639 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
aws/agentcore-cli#2606 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 [BUG] - FeatureComparisonTable text-only cells are top-aligned while icon cells are centeredĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 7 ngày
-
ai-driven-qa bug Cosmetic
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày