joplin-plugin-tag-navigator 2.10.7 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ This plugin adds inline tag support (such as #inline-tag) to [Joplin](https://jo
|
|
|
54
54
|
- Click a global tag to search for it, Cmd/Ctrl+click to add it to the current query, or Shift+click to insert it into the editor.
|
|
55
55
|
4. It can convert your existing inline tags to native Joplin tags, so that they are accessible using Joplin's built-in tag search.
|
|
56
56
|
5. It can convert your existing native Joplin tags to inline tags, so that they are accessible using inline tag search (this plugin). ([tips](#converting-joplin-tags))
|
|
57
|
-
6. It renders inline tags and front matter in the Markdown preview
|
|
57
|
+
6. It renders inline tags and front matter in both the Markdown preview and the Markdown editor. ([tips](#styling-inline-tags-and-checkboxes))
|
|
58
58
|
|
|
59
59
|
After installing the plugin, check the commands listed under `Tag Navigator` in the `Tools` menu, as well as the corresponding settings section.
|
|
60
60
|
|
|
@@ -106,7 +106,7 @@ After installing the plugin, check the commands listed under `Tag Navigator` in
|
|
|
106
106
|
- [Filtering results](#filtering-results)
|
|
107
107
|
- [Context expansion](#context-expansion)
|
|
108
108
|
- [Colour tags](#colour-tags)
|
|
109
|
-
- [Styling inline tags](#styling-inline-tags)
|
|
109
|
+
- [Styling inline tags and checkboxes](#styling-inline-tags-and-checkboxes)
|
|
110
110
|
|
|
111
111
|
### Advanced
|
|
112
112
|
- [Inline TODOs](#inline-todos)
|
|
@@ -137,6 +137,7 @@ After installing the plugin, check the commands listed under `Tag Navigator` in
|
|
|
137
137
|
- When the `Tag inheritance` setting is enabled (by default), tags are automatically inherited in three ways:
|
|
138
138
|
1. **Outline/indentation inheritance**: Tags are inherited from parent items to their children based on indentation levels.
|
|
139
139
|
- Example: If `#project/website` appears on a parent line, all indented child lines will also be tagged with `#project/website`
|
|
140
|
+
- Exception: four or more spaces of indent after a blank line, outside a list, is a Markdown code block. Those lines are skipped entirely when `Ignore code blocks` is on, so they neither carry nor inherit tags.
|
|
140
141
|
2. **Heading inheritance**: Tags are inherited from headings to all content under that heading.
|
|
141
142
|
- Example: If `## Meeting Notes #urgent` appears as a heading, all other *tagged lines* under that heading will also be tagged with `#urgent`
|
|
142
143
|
3. **Top of the note inheritance**: Tags are inherited from the first 2 lines of the note.
|
|
@@ -483,35 +484,137 @@ Context expansion lets you reveal surrounding lines around search results to see
|
|
|
483
484
|
|
|
484
485
|

|
|
485
486
|
|
|
486
|
-
### Styling inline tags
|
|
487
|
+
### Styling inline tags and checkboxes
|
|
487
488
|
|
|
488
|
-
|
|
489
|
+
Tags are displayed on three surfaces: the search panel, the Markdown preview and the Markdown editor. Every rendered tag, and every task marker, carries a shared class and a surface-specific one, each in a plain form and one per prefix or state:
|
|
490
|
+
|
|
491
|
+
| Class | Matches |
|
|
492
|
+
| ----- | ------- |
|
|
493
|
+
| `itags-tag`, `itags-tag--hash` / `--at` / `--plus` / `--slash` | every surface |
|
|
494
|
+
| `itags-search-renderedTag` (panel, preview), `itags-editor-tag` (editor), each with the same prefix suffixes | one surface |
|
|
495
|
+
| `itags-checkbox`, `itags-checkbox--open` / `--ongoing` / `--in-question` / `--blocked` / `--done` / `--obsolete` | task markers, panel and editor |
|
|
496
|
+
|
|
497
|
+
The `Inline tags and checkboxes: Style` setting takes custom CSS and applies it to all three. **This is the only way to restyle tags on mobile**, where `userstyle.css` cannot be edited. Your rules override the bundled default without needing `!important`.
|
|
498
|
+
|
|
499
|
+
`Inline checkboxes: Highlight in editor` colours the six task states in the editor. Joplin draws `[ ]` and `[x]` as checkboxes of its own, so those two keep their usual look and the other four, which Joplin does not recognise, get the state colour.
|
|
500
|
+
|
|
501
|
+
`Search: Panel style` and `Navigation: Panel style` style those panels as a whole rather than tags.
|
|
489
502
|
|
|
490
503
|
<details>
|
|
491
|
-
<summary>CSS
|
|
504
|
+
<summary>CSS examples for tag and checkbox styling</summary>
|
|
505
|
+
|
|
506
|
+
Style every tag on every surface:
|
|
492
507
|
|
|
493
508
|
```css
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
509
|
+
.itags-tag {
|
|
510
|
+
background-color: #a576b3;
|
|
511
|
+
}
|
|
512
|
+
```
|
|
498
513
|
|
|
499
|
-
|
|
514
|
+
Give each type of tag its own colour, everywhere:
|
|
515
|
+
|
|
516
|
+
```css
|
|
517
|
+
.itags-tag--at {
|
|
500
518
|
background-color: #6fae4a;
|
|
501
|
-
}
|
|
519
|
+
}
|
|
502
520
|
|
|
503
|
-
.itags-
|
|
521
|
+
.itags-tag--plus {
|
|
504
522
|
background-color: #ae4a6f;
|
|
505
523
|
}
|
|
506
524
|
|
|
507
|
-
.itags-
|
|
525
|
+
.itags-tag--slash {
|
|
508
526
|
background-color: #4a6fae;
|
|
509
527
|
}
|
|
510
528
|
```
|
|
511
529
|
|
|
512
|
-
|
|
530
|
+
Style one surface differently from the others. Avoid `display: inline-block` in the editor, where it disturbs caret placement:
|
|
531
|
+
|
|
532
|
+
```css
|
|
533
|
+
/* preview and panel only */
|
|
534
|
+
.itags-search-renderedTag {
|
|
535
|
+
display: inline-block;
|
|
536
|
+
margin: 2px 0;
|
|
537
|
+
}
|
|
513
538
|
|
|
514
|
-
|
|
539
|
+
/* editor only */
|
|
540
|
+
.itags-editor-tag {
|
|
541
|
+
background-color: transparent;
|
|
542
|
+
border-bottom: 2px solid #7698b3;
|
|
543
|
+
}
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
Fonts in the editor need one extra step. Joplin resets `font-family` on every span there, which outranks a bare class, so lead with `span`:
|
|
547
|
+
|
|
548
|
+
```css
|
|
549
|
+
span.itags-checkbox {
|
|
550
|
+
font-family: sans-serif;
|
|
551
|
+
}
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
Recolour a task state in the panel and the editor at once:
|
|
555
|
+
|
|
556
|
+
```css
|
|
557
|
+
.itags-checkbox--blocked {
|
|
558
|
+
color: #e22d2d;
|
|
559
|
+
}
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
In the panel the marker is a coloured square, so set `background-color` there:
|
|
563
|
+
|
|
564
|
+
```css
|
|
565
|
+
.itags-search-checkbox--blocked {
|
|
566
|
+
background-color: #e22d2d;
|
|
567
|
+
}
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
Draw the checkboxes Joplin renders for `[ ]` and `[x]` as text markers too, so that all six states match. This one reaches into Joplin's own editor markup, so it may need adjusting after a Joplin update, and it is left to you rather than bundled for that reason. The checkboxes stay clickable:
|
|
571
|
+
|
|
572
|
+
```css
|
|
573
|
+
.cm-editor .cm-ext-checkbox-toggle > input[type="checkbox"] {
|
|
574
|
+
appearance: none;
|
|
575
|
+
-webkit-appearance: none;
|
|
576
|
+
width: auto;
|
|
577
|
+
height: auto;
|
|
578
|
+
margin: 0;
|
|
579
|
+
font-family: monospace;
|
|
580
|
+
font-weight: bold;
|
|
581
|
+
color: #4178be;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.cm-editor .cm-ext-checkbox-toggle > input[type="checkbox"]::after {
|
|
585
|
+
content: "[ ]";
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.cm-editor .cm-ext-checkbox-toggle > input[type="checkbox"]:checked {
|
|
589
|
+
color: #64a073;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.cm-editor .cm-ext-checkbox-toggle > input[type="checkbox"]:checked::after {
|
|
593
|
+
content: "[x]";
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/* Joplin's checkbox stands in for the list bullet as well, so hide the bullet
|
|
597
|
+
on the lines it does not replace. */
|
|
598
|
+
.cm-editor .cm-line:has(.itags-editor-checkbox) .cm-bullet-list-marker {
|
|
599
|
+
display: none;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
/* The other states keep the space that follows their bullet in the text, so
|
|
603
|
+
the checkbox needs one too. It goes on the container, not in the monospace
|
|
604
|
+
marker, so that both spaces are the same width. */
|
|
605
|
+
.cm-editor .cm-ext-checkbox-toggle::before {
|
|
606
|
+
content: " ";
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/* Joplin reads [@] and its siblings as links, and underlines them. */
|
|
610
|
+
.cm-editor .itags-editor-checkbox * {
|
|
611
|
+
text-decoration: none;
|
|
612
|
+
}
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
The bullet rule needs `:has()`, which desktop Joplin and iOS 15.4 or later have. Without it the markers still get their colour, they just do not line up.
|
|
616
|
+
|
|
617
|
+
</details>
|
|
515
618
|
|
|
516
619
|
### Keyboard shortcuts
|
|
517
620
|
|
|
@@ -562,28 +665,6 @@ For the Markdown editor see Rich Markdown in the [Companion plugins](#companion-
|
|
|
562
665
|
|
|
563
666
|
- The excellent [Inline Tags](https://github.com/roman-r-m/joplin-inline-tags-plugin) plugin can autocomplete tags while typing.
|
|
564
667
|
- Use [YesYouKan](https://github.com/joplin/plugin-yesyoukan) to visualize kanban views generated by Tag Navigator as interactive kanban boards.
|
|
565
|
-
- You can highlight tags in the Markdown editor using [Rich Markdown](https://github.com/CalebJohn/joplin-rich-markdown) (version ≥ 0.14).
|
|
566
|
-
|
|
567
|
-
<details>
|
|
568
|
-
<summary>Rich Markdown setup instructions</summary>
|
|
569
|
-
|
|
570
|
-
- In `Joplin settings --> Rich Markdown --> Advanced Settings --> Custom classes JSON` enter:
|
|
571
|
-
```
|
|
572
|
-
[{"name": "rm-tag", "regex": "(?<=^|\\s)#([^\\s#'\",.()\\[\\]:;\\?\\\\]+)"}]
|
|
573
|
-
```
|
|
574
|
-
- In `Joplin settings --> Appearance --> Custom stylesheet for Joplin-wide app styles` add the following to the style sheet:
|
|
575
|
-
```
|
|
576
|
-
div.CodeMirror .cm-rm-tag {
|
|
577
|
-
background-color: #7698b3;
|
|
578
|
-
color: white !important;
|
|
579
|
-
padding: 0em 2px;
|
|
580
|
-
border-radius: 5px;
|
|
581
|
-
display: inline;
|
|
582
|
-
}
|
|
583
|
-
```
|
|
584
|
-
- On the mobile app, since it is impossible to edit the stylesheet, one could install this [Rich Markdown fork](https://github.com/alondmnt/joplin-rich-markdown/releases/tag/v0.15-mobile-style-v4) (with predefined support for tags and checkboxes) or instead define the name of the tag class to be `"name": "searchMatch"`. This will use the same highlighting style as Joplin search results.
|
|
585
|
-
|
|
586
|
-
</details>
|
|
587
668
|
|
|
588
669
|
## Motivation
|
|
589
670
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "joplin-plugin-tag-navigator",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"test": "jest",
|
|
6
6
|
"dist": "webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"publish"
|
|
17
17
|
],
|
|
18
18
|
"devDependencies": {
|
|
19
|
+
"@codemirror/lang-markdown": "^6.5.2",
|
|
19
20
|
"@codemirror/view": "^6.26.0",
|
|
20
21
|
"@joplin/lib": "~2.9",
|
|
21
22
|
"@types/jest": "^29.5.14",
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"desktop",
|
|
7
7
|
"mobile"
|
|
8
8
|
],
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.11.1",
|
|
10
10
|
"name": "Inline Tag Navigator",
|
|
11
11
|
"description": "Type inline tags or frontmatter in the note editor. View your tagged paragraphs and tasks / TODOs in a search panel, or in a generated note / kanban. Build a table view / database from notes and tags. Convert between Obsidian tags and Joplin tags.",
|
|
12
12
|
"author": "Alon Diament",
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
],
|
|
25
25
|
"screenshots": [],
|
|
26
26
|
"icons": {},
|
|
27
|
-
"_publish_hash": "sha256:
|
|
28
|
-
"_publish_commit": "main:
|
|
27
|
+
"_publish_hash": "sha256:bdcf0e9a0b0ac540ec81cde64c1fbfecb493a46a5b3866b3b13fb54d32bf2614",
|
|
28
|
+
"_publish_commit": "main:03a803885769c808485b6bc2188bc09df48bc0ed"
|
|
29
29
|
}
|