@yoopta/lists 4.3.0 → 4.3.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 +158 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,11 +1,164 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Lists plugins
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Lists include three plugins for Yoopta-Editor:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- NumberedList
|
|
6
|
+
- BulletedList
|
|
7
|
+
- TodoList
|
|
6
8
|
|
|
9
|
+
### Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
yarn add @yoopta/lists
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Usage
|
|
16
|
+
|
|
17
|
+
```jsx
|
|
18
|
+
import { NumberedList, BulletedList, TodoList } from '@yoopta/paragraph';
|
|
19
|
+
|
|
20
|
+
const plugins = [NumberedList, BulletedList, TodoList];
|
|
21
|
+
|
|
22
|
+
const Editor = () => {
|
|
23
|
+
return <YooptaEditor plugins={plugins} />;
|
|
24
|
+
};
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## NumberedList
|
|
28
|
+
|
|
29
|
+
### Default classnames
|
|
30
|
+
|
|
31
|
+
- .yoopta-numbered-list
|
|
32
|
+
- .yoopta-numbered-list-count
|
|
33
|
+
- .yoopta-numbered-list-content
|
|
34
|
+
|
|
35
|
+
### Default options
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
const NumberedList = new YooptaPlugin({
|
|
39
|
+
options: {
|
|
40
|
+
display: {
|
|
41
|
+
title: 'Numbered List',
|
|
42
|
+
description: 'Create list with numbering',
|
|
43
|
+
},
|
|
44
|
+
shortcuts: ['1.'],
|
|
45
|
+
},
|
|
46
|
+
});
|
|
7
47
|
```
|
|
8
|
-
const lists = require('yoopta-lists');
|
|
9
48
|
|
|
10
|
-
|
|
49
|
+
### Options to extend
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
const plugins = [
|
|
53
|
+
NumberedList.extend({
|
|
54
|
+
renders: {
|
|
55
|
+
numbered-list: (props) => <YourCustomComponent {...props} />
|
|
56
|
+
},
|
|
57
|
+
options: {
|
|
58
|
+
shortcuts: [`<your custom shortcuts>`],
|
|
59
|
+
align: 'left' | 'center' | 'right',
|
|
60
|
+
display: {
|
|
61
|
+
title: `<your custom title>`,
|
|
62
|
+
description: `<your custom description>`,
|
|
63
|
+
},
|
|
64
|
+
HTMLAttributes: {
|
|
65
|
+
className: '<your classname>',
|
|
66
|
+
// ...other HTML attributes
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
];
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## BulletedList
|
|
74
|
+
|
|
75
|
+
### Default classnames
|
|
76
|
+
|
|
77
|
+
- .yoopta-bulleted-list
|
|
78
|
+
- .yoopta-bulleted-list-bullet
|
|
79
|
+
- .yoopta-bulleted-list-content
|
|
80
|
+
|
|
81
|
+
### Default options
|
|
82
|
+
|
|
83
|
+
```js
|
|
84
|
+
const BulletedList = new YooptaPlugin({
|
|
85
|
+
options: {
|
|
86
|
+
display: {
|
|
87
|
+
title: 'Bulleted List',
|
|
88
|
+
description: 'Create bullet list',
|
|
89
|
+
},
|
|
90
|
+
shortcuts: ['-'],
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Options to extend
|
|
96
|
+
|
|
97
|
+
```tsx
|
|
98
|
+
const plugins = [
|
|
99
|
+
BulletedList.extend({
|
|
100
|
+
renders: {
|
|
101
|
+
bulleted-list: (props) => <YourCustomComponent {...props} />
|
|
102
|
+
},
|
|
103
|
+
options: {
|
|
104
|
+
shortcuts: [`<your custom shortcuts>`],
|
|
105
|
+
align: 'left' | 'center' | 'right',
|
|
106
|
+
display: {
|
|
107
|
+
title: `<your custom title>`,
|
|
108
|
+
description: `<your custom description>`,
|
|
109
|
+
},
|
|
110
|
+
HTMLAttributes: {
|
|
111
|
+
className: '<your classname>',
|
|
112
|
+
// ...other HTML attributes
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
];
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## TodoList
|
|
120
|
+
|
|
121
|
+
### Default classnames
|
|
122
|
+
|
|
123
|
+
- .yoopta-todo-list
|
|
124
|
+
- .yoopta-todo-list-checkbox
|
|
125
|
+
- .yoopta-todo-list-checkbox-input
|
|
126
|
+
- .yoopta-todo-list-content
|
|
127
|
+
|
|
128
|
+
### Default options
|
|
129
|
+
|
|
130
|
+
```js
|
|
131
|
+
const TodoList = new YooptaPlugin({
|
|
132
|
+
options: {
|
|
133
|
+
display: {
|
|
134
|
+
title: 'Todo List',
|
|
135
|
+
description: 'Track tasks',
|
|
136
|
+
},
|
|
137
|
+
shortcuts: ['[]'],
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Options to extend
|
|
143
|
+
|
|
144
|
+
```tsx
|
|
145
|
+
const plugins = [
|
|
146
|
+
TodoList.extend({
|
|
147
|
+
renders: {
|
|
148
|
+
todo-list: (props) => <YourCustomComponent {...props} />
|
|
149
|
+
},
|
|
150
|
+
options: {
|
|
151
|
+
shortcuts: [`<your custom shortcuts>`],
|
|
152
|
+
align: 'left' | 'center' | 'right',
|
|
153
|
+
display: {
|
|
154
|
+
title: `<your custom title>`,
|
|
155
|
+
description: `<your custom description>`,
|
|
156
|
+
},
|
|
157
|
+
HTMLAttributes: {
|
|
158
|
+
className: '<your classname>',
|
|
159
|
+
// ...other HTML attributes
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
];
|
|
11
164
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/lists",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "Lists plugin for Yoopta Editor",
|
|
5
5
|
"author": "Darginec05 <devopsbanda@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/Darginec05/Editor-Yoopta/issues"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "e90c09f4f1c4165638f99ab8fe6ec72c544183ec"
|
|
38
38
|
}
|