joplin-plugin-collapsible-blocks 1.1.0 → 1.2.0

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
@@ -4,9 +4,9 @@ This Joplin plugin allows you to create collapsible blocks with a title and exte
4
4
 
5
5
  Although the blocks this plugin creates are only collapsible in the webview, not the editor, it seems to pair well with the "Extra Markdown Editor Settings" plugin, which does allow for collapsing text in the editor, if "Enable code folding" is enabled in its settings. The collapsible blocks made by this plugin are detected by it as code, and are editor-foldable. If you're nesting collapsible blocks, only the outermost one (in the editor) will be foldable with this method.
6
6
 
7
- **Version**: 1.1.0
7
+ **Version**: 1.2.0
8
8
 
9
- ## Installation
9
+ ### Installation
10
10
 
11
11
  - Open Joplin and navigate to `Preferences > Plugins`
12
12
  - Search for `Collapsible blocks` and click install
@@ -30,13 +30,13 @@ In order to create a collapsible block, you can:
30
30
 
31
31
  ```
32
32
  :{Block title
33
- Block body here
34
- And here
35
- And here...
33
+ Block body here
34
+ And here
35
+ And here...
36
36
  }:
37
37
  ```
38
38
 
39
- Nothing but whitespace may come before the `:{`. The title of the block must always appear on the same line as the `:{`. A title may be omitted. You can choose to put the `}:` on the same line as the last line of body text, or on its own line, but nothing is allowed to come after the `}:`. Indenting the body text is optional but recommended. In general, this plugin is designed to be extremely forgiving with how things are formatted and indented. The following examples (and more!) are all valid:
39
+ Nothing but whitespace may come before the `:{`. The title of the block must always appear on the same line as the `:{`. A title may be omitted. You can choose to put the `}:` on the same line as the last line of body text, or on its own line, but nothing is allowed to come after the `}:`. In general, this plugin is designed to be extremely forgiving with how things are formatted and indented. The following examples (and more!) are all valid:
40
40
 
41
41
  **Examples**:
42
42
  ```
@@ -64,24 +64,19 @@ Body
64
64
  :{Title
65
65
  Body}:
66
66
 
67
- :{Title
68
- Body}:
69
-
70
67
  :{Title
71
68
  Body
72
69
  }:
73
-
74
- :{Title
75
- Body
76
- }:
77
70
  ```
78
71
  (for readability, the last way is recommended)
79
72
 
73
+ The text in the editor will use CSS to automatically indent blocks, based on how deeply nested the blocks are. This can be disabled or configured in the settings.
74
+
80
75
  Blocks will remember if you left them opened or closed. They will do so by editing the opener in the editor from `:{` to `:{:{` when opened, or back to `:{` when closed. You may also do this manually.
81
76
 
82
77
  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.
83
78
 
84
- When nesting blocks within blocks, they will be color-coded in the editor, and may also be color-coded in the webview. These can both be controlled in the plugin Settings tab.
79
+ When nesting blocks within blocks, they will 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.
85
80
 
86
81
  ## Screenshots
87
82
 
@@ -101,7 +96,18 @@ With a fourth one added, for three nesting levels, and webview colors enabled
101
96
 
102
97
  ![](screenshots/4.png)
103
98
 
104
- ## Custom styles
99
+ ## Settings
100
+ 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
+ * Enable or disable the color coding in the webview and editor
103
+ * 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 less
105
+
106
+ ![](screenshots/settings.png)
107
+
108
+ ## Advanced
109
+
110
+ ### Custom styles
105
111
 
106
112
  If you would like to style the collapsible blocks to your preference, use the following in your `userstyle.css` file, which can be accessed in `Joplin` → `Options` → `Appearance` → `Show Advanced Settings` → `Custom stylesheet for rendered Markdown`:
107
113
 
@@ -130,8 +136,10 @@ be applied if "Do Webview Colors" is enabled in the plugin settings */
130
136
  }
131
137
  ```
132
138
 
133
- ## Settings
134
- There is a settings page for the plugin in the Joplin options. There, you can customize the start and end tokens away from the default `:{` and `}:`, or enable/disable the color coding in the webview and editor. You can also disable the plugin's ability to remember if a collapsible block was last left open or closed in the webview, relying solely on how you define it in the editor.
139
+ ## Troubleshooting
140
+ If the collapsible block is not showing up, or is showing up but you're unable to toggle it opened or closed, then you're likely accidentally in the Rich Text Editor, instead of the Markdown Editor. Joplin's Rich Text Editor does [not support most Markdown plugins](https://joplinapp.org/help/apps/rich_text_editor/#limitations). To enter the Markdown editor, look for the controls in the image below, in the upper right of Joplin. Make sure the Markdown/Rich Text toggle is on the left (red) side, and then use the blue button to swap between the editor and webview.
141
+
142
+ ![](screenshots/troubleshooting.png)
135
143
 
136
144
  ## Notes
137
145
 
@@ -139,7 +147,7 @@ There is a settings page for the plugin in the Joplin options. There, you can cu
139
147
 
140
148
  ## Acknowledgement
141
149
 
142
- Thanks to the creator of the [Joplin Spoilers](https://github.com/martinkorelic/joplin-plugin-spoilers) plugin, whose code helped me build this plugin.
150
+ Thanks to the creator of the [Joplin Spoilers](https://github.com/martinkorelic/joplin-plugin-spoilers) plugin, whose code helped me build this plugin. Our code bases and methodologies are wildly different at this point, but it got me started with Joplin plugins.
143
151
 
144
152
  ## Other plugins
145
153
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joplin-plugin-collapsible-blocks",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
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",
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 1,
3
3
  "id": "joplin.plugin.collapsible.blocks",
4
4
  "app_min_version": "3.2",
5
- "version": "1.1.0",
5
+ "version": "1.2.0",
6
6
  "name": "Collapsible blocks",
7
7
  "description": "Create collapsible blocks with title and extendable body.",
8
8
  "author": "ntczkjfg",
@@ -24,6 +24,6 @@
24
24
  "desktop",
25
25
  "mobile"
26
26
  ],
27
- "_publish_hash": "sha256:ac51faca341b542b7e392e1836100d4782fc7da6679287b92d61deebfd0a6209",
28
- "_publish_commit": "master:3e839324698256c44f70f6c574f6af2d26787183"
27
+ "_publish_hash": "sha256:0e7d4b4c8b04bc49754d57b56ebfa92974de7e0463ea97d8bbdb430f7b4fc1c7",
28
+ "_publish_commit": "master:84d8c3ea55950bed78ea3307eff89fb3ea397eb0"
29
29
  }