joplin-plugin-collapsible-blocks 1.2.1 → 1.9.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
|
@@ -1,27 +1,36 @@
|
|
|
1
|
-
# Joplin Plugin - Collapsible
|
|
1
|
+
# Joplin Plugin - Collapsible Sections
|
|
2
2
|
|
|
3
|
-
This Joplin plugin allows you to create collapsible blocks with a title and extendable body. The blocks
|
|
3
|
+
This Joplin plugin allows you to create collapsible blocks with a title and extendable body. The blocks:
|
|
4
|
+
* Can be nested within one another
|
|
5
|
+
* Remember if they were left opened or closed
|
|
6
|
+
* Can color-coordinate between the editor and webview
|
|
7
|
+
* Collapse in both the editor and the webview
|
|
8
|
+
* Support the use of markdown within them
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
Additionally, this plugin allows you to collapse headings within notes, in both the editor and the webview, with no additional syntax.
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
There are many settings available to customize the desired features and behaviors.
|
|
13
|
+
|
|
14
|
+
This plugin works on both Desktop and Mobile.
|
|
15
|
+
|
|
16
|
+
**Version**: 1.9.1
|
|
8
17
|
|
|
9
18
|
### Installation
|
|
10
19
|
|
|
11
20
|
- Open Joplin and navigate to `Preferences > Plugins`
|
|
12
|
-
- Search for `Collapsible
|
|
21
|
+
- Search for `Collapsible Sections` and click install
|
|
13
22
|
- Restart Joplin
|
|
14
23
|
|
|
15
24
|
### Uninstall
|
|
16
25
|
|
|
17
26
|
- Open Joplin and navigate to `Tools > Options > Plugins`
|
|
18
|
-
-
|
|
19
|
-
- Press `Delete` to remove the plugin or
|
|
27
|
+
- Find the `Collapsible Sections` plugin
|
|
28
|
+
- Press `Delete` to remove the plugin, or click the toggle to disable it
|
|
20
29
|
- Restart Joplin
|
|
21
30
|
|
|
22
31
|
## Usage
|
|
23
32
|
|
|
24
|
-
### Collapsible
|
|
33
|
+
### Collapsible blocks
|
|
25
34
|
|
|
26
35
|
In order to create a collapsible block, you can:
|
|
27
36
|
- press on the `Collapsible block` toolbar button to create a template collapsible, or
|
|
@@ -45,11 +54,19 @@ Nothing but whitespace may come before the `:{`. The title of the block must alw
|
|
|
45
54
|
:{
|
|
46
55
|
}:
|
|
47
56
|
|
|
57
|
+
:{
|
|
58
|
+
|
|
59
|
+
}:
|
|
60
|
+
|
|
48
61
|
:{Title}:
|
|
49
62
|
|
|
50
63
|
:{Title
|
|
51
64
|
}:
|
|
52
65
|
|
|
66
|
+
:{Title
|
|
67
|
+
|
|
68
|
+
}:
|
|
69
|
+
|
|
53
70
|
:{
|
|
54
71
|
Body}:
|
|
55
72
|
|
|
@@ -57,10 +74,6 @@ Body}:
|
|
|
57
74
|
Body
|
|
58
75
|
}:
|
|
59
76
|
|
|
60
|
-
:{
|
|
61
|
-
Body
|
|
62
|
-
}:
|
|
63
|
-
|
|
64
77
|
:{Title
|
|
65
78
|
Body}:
|
|
66
79
|
|
|
@@ -76,32 +89,40 @@ Blocks will remember if you left them opened or closed. They will do so by editi
|
|
|
76
89
|
|
|
77
90
|
If you don't want it to remember if you left a block opened or closed, you can turn this off globally in the plugin settings - or on a per-block basis by doubling the end token, from `}:` to `}:}:`. When you do this, you can still open and close the block in the webview, but they will not save their state in the editor - so the next time the note is loaded, they will be opened or closed again, depending on whether their opening token is `:{:{` or `:{`, respectively. So a block like `:{:{this}:}:` will always be initially open when you open a note, while a block like `:{this}:}:` will always be initially closed when you open a note.
|
|
78
91
|
|
|
79
|
-
When nesting blocks within blocks, they
|
|
92
|
+
When nesting blocks within blocks, they can be color-coded in the editor, and may also be color-coded in the webview. These can both be controlled (enabled or disabled) in the plugin Settings tab.
|
|
80
93
|
|
|
81
|
-
|
|
94
|
+
### Collapsible Headings
|
|
82
95
|
|
|
83
|
-
|
|
96
|
+
When you create headings within a note (by starting a line with `#`, `##`, `###`, `####`, `#####`, or `######`), this plugin automatically makes them collapsible, with no additional syntax required. This can be enabled or disabled in both the editor and the webview in settings. The collapsible region beneath a heading will extend to the next heading of equal or higher precedence. So, for example, a `#` heading will collapse to the next `#` heading, while a `###` heading will collapse to the next `#`, `##`, or `###` heading. Collapsible headings and collapsible blocks do play nicely with each other, and can be nested freely.
|
|
84
97
|
|
|
85
|
-
|
|
98
|
+
Headings do remember if they should be left opened or closed (This can be disabled in settings). Due to the lack of special syntax, this is done by adding or removing a space from the end of the line with the heading. A heading with no space at the end is considered opened, while a heading with a space at the end is considered closed. For example:
|
|
86
99
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
100
|
+
```
|
|
101
|
+
# This heading does not end in a space, and so will render as opened when the note is loaded
|
|
102
|
+
This text will be visible when the note is loaded.
|
|
103
|
+
# This heading does end in a space, and so will render as closed when the note is loaded
|
|
104
|
+
This text will not be visible when the note is loaded. That is because there is a space ↑ here, after the word 'loaded', in the previous line.
|
|
105
|
+
```
|
|
90
106
|
|
|
91
|
-
|
|
107
|
+
## Screenshots
|
|
92
108
|
|
|
93
|
-
|
|
109
|
+
Various headings and collapsible blocks, all open, with colors enabled
|
|
110
|
+

|
|
94
111
|
|
|
95
|
-
|
|
112
|
+
The same note, with some headings and blocks collapsed
|
|
113
|
+

|
|
96
114
|
|
|
97
|
-

|
|
98
115
|
|
|
99
116
|
## Settings
|
|
100
117
|
There is a settings page for the plugin in the Joplin options. There, you can:
|
|
101
|
-
* Customize the start and end tokens away from the default `:{` and `}:`
|
|
102
118
|
* Enable or disable the color coding in the webview and editor
|
|
119
|
+
* Customize the start and end tokens away from the default `:{` and `}:`
|
|
103
120
|
* Globally disable the plugin's ability to remember if a collapsible block's opened/closed status was changed in the webview
|
|
104
|
-
* Disable automatic CSS indentation of collapsible block text in the editor, or configure it to indent more or
|
|
121
|
+
* Disable automatic CSS indentation of collapsible block text in the editor, or configure it to indent more or
|
|
122
|
+
* Enable or disable collapsing within the editor as well as the webview
|
|
123
|
+
* Toggle whether folding changes in one view automatically trigger folding changes in the other view
|
|
124
|
+
* Enable or disable header-based collapsing in the webview or editor
|
|
125
|
+
* Enable or disable remembering whether headers were left opened or closed
|
|
105
126
|
|
|
106
127
|

|
|
107
128
|
|
|
@@ -122,17 +143,17 @@ details.cb-details summary {
|
|
|
122
143
|
|
|
123
144
|
}
|
|
124
145
|
|
|
125
|
-
/* Below are used for
|
|
126
|
-
be applied if
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
146
|
+
/* Below are used for coloring nested collapsible blocks, and will
|
|
147
|
+
only be applied if colors are enabled in the plugin settings */
|
|
148
|
+
:root {
|
|
149
|
+
--cb-color-0: #a0a0a0;
|
|
150
|
+
--cb-color-1: #6b5fd6; /* blue-violet */
|
|
151
|
+
--cb-color-2: #2bb0e6; /* bright cyan-blue */
|
|
152
|
+
--cb-color-3: #6b5fd6;
|
|
153
|
+
--cb-color-4: #2bb0e6;
|
|
154
|
+
--cb-color-5: #6b5fd6;
|
|
155
|
+
--cb-color-6: #2bb0e6;
|
|
156
|
+
--cb-color-7: #6b5fd6;
|
|
136
157
|
}
|
|
137
158
|
```
|
|
138
159
|
|
|
@@ -141,9 +162,9 @@ If the collapsible block is not showing up, or is showing up but you're unable t
|
|
|
141
162
|
|
|
142
163
|

|
|
143
164
|
|
|
144
|
-
##
|
|
165
|
+
## Issues
|
|
145
166
|
|
|
146
|
-
- **
|
|
167
|
+
- **Encounter any bugs?** [Report them here](https://github.com/ntczkjfg/joplin-plugin-collapsible-block/issues), and I'll do my best to fix them.
|
|
147
168
|
|
|
148
169
|
## Acknowledgement
|
|
149
170
|
|
|
@@ -151,4 +172,6 @@ Thanks to the creator of the [Joplin Spoilers](https://github.com/martinkorelic/
|
|
|
151
172
|
|
|
152
173
|
## Other plugins
|
|
153
174
|
|
|
154
|
-
|
|
175
|
+
Check out my other plugins:
|
|
176
|
+
* [Click-to-Copy Spans](https://github.com/ntczkjfg/joplin-plugin-click-to-copy-span)! Easily create spans of text that, when clicked, are automatically copied to your clipboard for fast and easy pasting.
|
|
177
|
+
* [Hotstrings & Hotkeys]()https://github.com/ntczkjfg/joplin-plugin-hotstrings)! Easily create user-defined hotstrings and hotkeys for simple text insertion and replacement.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "joplin-plugin-collapsible-blocks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dist": "webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive",
|
|
6
6
|
"prepare": "npm run dist",
|
|
Binary file
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": 1,
|
|
3
3
|
"id": "joplin.plugin.collapsible.blocks",
|
|
4
|
-
"app_min_version": "3.
|
|
5
|
-
"version": "1.
|
|
6
|
-
"name": "Collapsible
|
|
7
|
-
"description": "Create collapsible blocks with title and extendable body.",
|
|
4
|
+
"app_min_version": "3.3",
|
|
5
|
+
"version": "1.9.1",
|
|
6
|
+
"name": "Collapsible Sections",
|
|
7
|
+
"description": "Create collapsible blocks with title and extendable body, and make headings collapsible too.",
|
|
8
8
|
"author": "ntczkjfg",
|
|
9
9
|
"homepage_url": "https://github.com/ntczkjfg/joplin-plugin-collapsible-block",
|
|
10
10
|
"repository_url": "https://github.com/ntczkjfg/joplin-plugin-collapsible-block",
|
|
@@ -18,12 +18,17 @@
|
|
|
18
18
|
"details",
|
|
19
19
|
"fold",
|
|
20
20
|
"foldable",
|
|
21
|
-
"folding"
|
|
21
|
+
"folding",
|
|
22
|
+
"editor",
|
|
23
|
+
"mobile",
|
|
24
|
+
"obsidian",
|
|
25
|
+
"heading",
|
|
26
|
+
"header"
|
|
22
27
|
],
|
|
23
28
|
"platforms": [
|
|
24
29
|
"desktop",
|
|
25
30
|
"mobile"
|
|
26
31
|
],
|
|
27
|
-
"_publish_hash": "sha256:
|
|
28
|
-
"_publish_commit": "master:
|
|
32
|
+
"_publish_hash": "sha256:35a824afb575d56213a29c28a6eb9d508c6149748081e070ba3027f68af0a674",
|
|
33
|
+
"_publish_commit": "master:dcb50637167916ac6bfad25ae4437473535d65e2"
|
|
29
34
|
}
|