Embed any search - with content!

Hi everybody!

This is new plugin that allows to embed links returned for any search!
It includes searches for tags and notebooks (tag:"some tag" etc) and plain notes

To use it type in editor:

```search
your search query
```

Peek 2021-01-26 19-22

As a bonus if note is Todo it can be ticked on/off right from the list.

It works for Joplin v.1.7.4 or higher

Additional features

  • you can paste sort:asc or sort:desc to sort notes by title ascending or descending
  • A shorthand notebook:this, that narrows search to current notebook only.
  • Basic content embedding content:true (beta):

    P.S.
    There are 3 backticks,not single quotes.
    Its in left upper corner of keyboard below ESC key.
    :slight_smile:
21 Likes

Very nice.
I was thinking of doing exactly the same (hence my question here).

One limitation you have (easy to remove, though) is that, as far as I can see, it supports only one such search per document.

Good point, thanks.
Indeed, its because inserted token uses fixed id so data gets overwritten.

EDIT: version 1.0.3 has it fixed.

A post was merged into an existing topic: Could not install plugin: No manifest for plugin ID ’undefined’

I installed the plugin but nothing happens. Do I need to run something else like npm? Is there somewhere where it explains how to run plugins properly?

What version are you on? The min app version is 1.7. If you are below that then it won't work.

1 Like

Oh my bad. I checked to make sure that the latest version was installed and Joplin told me there are no updates but now I checked again and it says version 1.6.8. Thank you I was thinking I was missing something

Even that won't help you. 1.7.6 is currently a pre-release version (you can still download it from GitHub or tick the "get pre releases..." box in the options to allow checking for it.) - Releases · laurent22/joplin · GitHub
The "app_min_version" line in the plugin basically means that you can install it but Joplin will refuse to run it, I believe there are plans to change this behaviour to make it more obvious as to why it won't work.
There is still a lot of active development surrounding the plugins as require additional functionality so sometimes you will find that they are only validated for pre-releases because of the added functionality - sometimes they might actually work on a lower version but the dev has just mistakenly left the min version too high.

3 Likes

@Daeraxa thanks for explaining the problem!

Indeed it works for Joplin 1.7.4 and up.
I edited first post to not confuse users.

1 Like

Very nice.

1 Like

@ambrt
Would it be possible to remove the result for the Note where the search is embedded?
In the moment whatever is searched, the note containing the search itself is always given back.

This Loop seems to be not helpfull.

Thanks for the work

1 Like

Yes, it is doubling as of now. I will fix this in next release

This function is now in new version (1.0.4).

The only distinction is that it will omit self when
text is typed in search block but will include self if it's somewhere in a body additionally.
Reasoning is that if note has normal text
with this search phrase then it should be included as a valid result for search.

Let me know if that solves your problem.

@ambrt , Just noticed that this search to find undone check-boxes in the body of notes is not working in version 1.0.4

```search
/"- [ ]"
```

It used to work in a previous version. Maybe I messed something up at this end?

1 Like

@ambrt
1.0.4 is solving my issue with "self-reference" but opens up the issue mentioned by @johano.

@johano
It is the same for me,

 ```search
 /"- [ ]"
 ```

is also not working for me.

Thanks for the work.

1 Like

when i use Embed Search, i can not output note as PDF and other format document.

1 Like

Thanks for posting - fixed it so this should work in 1.0.5.
Available in github as .jpl now or in Joplin Plugins when it will be approved.

You're welcome!

1 Like

Thanks for reporting, i will investigate

1 Like

I've checked and I have same error.
Problem appears to be with Joplin and handling plugin files (used for styling preview in this case).
I think all plugins using own styling are affected
so I posted this bug to Joplin repository

I will use work around until problem is solved

1 Like

Hi @ambrt I love your plugin and already use it greatly.
I am using it, probably as intended, in several different Overview notes including several lists each.
I started creating templates for these notes, and simply copy/paste those templates around.
However, I often have to adjust the searches for the notebook the note is in, to filter for notes "below" the current one. I don't think there is a way yet to search for notes "in this notebook".

Could you introduce a "variable" in your search syntax, which returns the current notebook?
e.g: this in search notebook:this tag:prio1 type:todo

2 Likes