Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Ability to Create Dynamic Search Query Blocks Using JS Engine

オープン
#25 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, typescript
領域
tooling

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
191
フォーク
15
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mProjectsCode/obsidian-js-engine-plugin のほかの issue

mProjectsCode/obsidian-js-engine-plugin の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。