Ability to Create Dynamic Search Query Blocks Using JS Engine
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, typescript
- Ambito
- tooling
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 191
- Fork
- 15
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di mProjectsCode/obsidian-js-engine-plugin
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
mProjectsCode/obsidian-js-engine-plugin#50 · 3 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 42/100
Tutte le issue di mProjectsCode/obsidian-js-engine-plugin
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
area:tools bug good first issue help wanted priority:P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
TaewoooPark/Motifcode#14 ·
-
bug 🐞
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
BasedHardware/omi#15320 ·
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 78/100
vercel/vercel-plugin#199 ·