editorjs-toggle-block
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -0,3 +1,8 @@ | ||
## 0.1.1 (06.05.2022) | ||
* Improve library docs. | ||
* Fix security vulnerabilities. | ||
## 0.1.0 (05.05.2022) | ||
* Initial release | ||
* Initial release. |
{ | ||
"name": "editorjs-toggle-block", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Toogle block tool for Editor.js", | ||
@@ -5,0 +5,0 @@ "main": "./dist/bundle.js", |
@@ -5,3 +5,3 @@ # EditorJS Toggle Block | ||
![](assets/demo_with_other_blocks.gif) | ||
![](assets/demo.gif) | ||
@@ -37,67 +37,4 @@ ## Installation | ||
### Output data | ||
| Field | Type | Description | | ||
| ------ | -------- | --------------------------------------------------- | | ||
| text | `string` | Main text | | ||
| status | `string` | Toggle status | | ||
| items | `number` | Indicates the number of nested blocks in the toggle | | ||
### Sample data | ||
```js | ||
{ | ||
type: 'toggle', | ||
data: { | ||
text: 'Toggle A', | ||
status: 'open', | ||
items: 3, | ||
} | ||
}, | ||
{ | ||
type: 'paragraph', | ||
data: { text: 'A1' } | ||
}, | ||
{ | ||
type: 'paragraph', | ||
data: { text: 'A2' } | ||
}, | ||
{ | ||
type: 'paragraph', | ||
data: { text: 'A3' } | ||
}, | ||
{ | ||
type: 'toggle', | ||
data: { | ||
text: '', | ||
status: 'open', | ||
items: 0, | ||
} | ||
}, | ||
{ | ||
type: 'toggle', | ||
data: { | ||
text: 'It is empty', | ||
status: 'closed', | ||
items: 0, | ||
} | ||
} | ||
``` | ||
### Sample visualization | ||
![](assets/first_sample.png) | ||
![](assets/second_sample.png) | ||
![](assets/third_sample.png) | ||
### Shortcuts | ||
On the editor you can: | ||
1. Type the `>` character followed by `Space` to create a new toggle. | ||
@@ -104,0 +41,0 @@ 2. Type `Shift` + `Tab` to extract a nested block. |
Sorry, the diff of this file is not supported yet
1182451
28
88