@yoopta/paragraph 4.3.0 → 4.3.2
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 +57 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,11 +1,63 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Paragraph plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Paragraph is default plugin for Yoopta-Editor
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### Installation
|
|
6
6
|
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @yoopta/paragraph
|
|
7
9
|
```
|
|
8
|
-
const paragraph = require('yoopta-paragraph');
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
### Usage
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
import Paragraph from '@yoopta/paragraph';
|
|
15
|
+
|
|
16
|
+
const plugins = [Paragraph];
|
|
17
|
+
|
|
18
|
+
const Editor = () => {
|
|
19
|
+
return <YooptaEditor plugins={plugins} />;
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Default classnames
|
|
24
|
+
|
|
25
|
+
- .yoopta-paragraph
|
|
26
|
+
|
|
27
|
+
### Default options
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
const Paragraph = new YooptaPlugin({
|
|
31
|
+
options: {
|
|
32
|
+
display: {
|
|
33
|
+
title: 'Text',
|
|
34
|
+
description: 'Start writing plain text.',
|
|
35
|
+
},
|
|
36
|
+
shortcuts: ['p', 'text'],
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Options to extend
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
const plugins = [
|
|
45
|
+
Paragraph.extend({
|
|
46
|
+
renders: {
|
|
47
|
+
paragraph: (props) => <YourCustomComponent {...props} />
|
|
48
|
+
},
|
|
49
|
+
options: {
|
|
50
|
+
shortcuts: [`<your custom shortcuts>`],
|
|
51
|
+
align: 'left' | 'center' | 'right',
|
|
52
|
+
display: {
|
|
53
|
+
title: `<your custom title>`,
|
|
54
|
+
description: `<your custom description>`,
|
|
55
|
+
},
|
|
56
|
+
HTMLAttributes: {
|
|
57
|
+
className: '<your classname>',
|
|
58
|
+
// ...other HTML attributes
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
];
|
|
11
63
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/paragraph",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.2",
|
|
4
4
|
"description": "Paragraph 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": "228dd8503a28b29beac2f40786e148d710a3fc74"
|
|
38
38
|
}
|