Expander: Search and include list of notes

Thank you @andrezgz for the update, but even with the legacy editor reinstated its still broken. It might be a cache issue as I did have the new wysiwyg turned on. Its not other plugins causing the issue so I bet its some other aspect of the latest Obsidian version.

Good idea to update git with the issue. I’ll look into that.

1 Like

Having the same issue here. Would love to see it resolved if @mrjackphil gets a chance.

Hey, if someone still have an issue - please ping me again.
I didn’t notice new issues recently and didn’t have issues myself.
But did some fixes.

So, if you have problems with the plugin - ping me again here or GitHub.

1 Like

Text Expand 0.11.0

  • add eta template engine

  • collapse expand code block in preview and live preview

  • update results when click on button in collapsed text expand code block (works in Live Preview only)

  • Small fixes here and there

Obsidian_t8cXVygUAl

4 Likes

Hello all – is it possible that the plugin has been broken by a recent update, again?

I’m a relatively new Obsidian user (v1.0.3) and just installed the latest Text expand plugin (v0.11.2) but cannot for the life of me get it to work.

When I click “Run expand query” it does run the search in the search pane, but it doesn’t actually seem to use the template (I’ve tried both default and custom specified in the md). It seems like it’s executing the query but not copying and pasting the results into the formatted result.

I do have restricted mode off and otherwise am stumped here.

Suggestions? I was really excited to find this plugin!!

Many thanks.
Ben.

Ah – never mind, all, my apologies, I misunderstood how the plugin works.

I had hoped that when I open a page in Reading Mode it would execute and expand inline – but it seems that it only works in editing mode, i.e., assists me to edit the page and expand the link: but does not make a live view of the page.

As such I’m back to square one. I was really hoping for something a little more like dataview.

Thanks nonetheless!

1 Like

Doesn’t dataview should do the trick?

No, unfortunately it doesn’t quite work. Dataview has access to a bunch of info about each note in the query result: but it doesn’t expose access to the text content of the note itself. I wanted to be able to dynamically include the content of each note matching the query. But I can only access its title, or metadata from the YAML frontmatter.

I think I could write some fairly complex js to access it via dataviewjs, but I wanted a simple query, something like:

```dataview
list file.content
from #exampletag

But I am 99% sure that's not possible. (If you have a suggestion I would be very grateful!)
1 Like

This is probably my all-time favorite plugin. I love it! It’s completely transformed my workflow.

One thing I haven’t been able to figure out though is how to get rid of the “run expand query” button. I’m a real noob so I’m sorry if this has been covered and I just didn’t realize it. Just as an experiment I tried deleting the following lines from the main.js file, and it seemed to work, but I don’t know if there will be any unintended consequences:

.createDiv()
.createEl('button', { text: 'Run expand query' })
.addEventListener('click', this.init.bind(this, false, ctx.getSectionInfo(el).lineStart));

I find the idea extremely useful for my use case. Thank you for making it!
But I can’t make it work. (Obsidian Version 1.1.9)

Here’s my expander text:

tag:#mytag

<% it.files.forEach(file => { %>
   - <%= file.link %> 
<% }) %>

The search function triggers and opens in the side panel, So the search query seems to work. But the files are not linked.

What am I doing wrong?

Hi folks, I have been using Expander in a very simple Search manner for MoCs with this text:

#book OR #author -TP

All my Templates end with _TP so at least at the time I thought I was excluding template files from the list.

But I noticed that my Book Notes_TP template is showing up in the list.

How do I exclude this note or is there a regex to exclude patterns?

If I should be using a different method for creating simple note searches in a note, please suggest the idea. Its been a while and I see a lot has changed.

I think I just post things to help me think, as I figured it out.

I simply reversed the order, the search exclusion before the search Inclusions
-_TP #book OR #author